compilation on NT Alpha. Mostly added casts etc.
extern DL_IMPORT(void) _Py_NewReference Py_PROTO((PyObject *));
extern DL_IMPORT(void) _Py_ForgetReference Py_PROTO((PyObject *));
extern DL_IMPORT(void) _Py_PrintReferences Py_PROTO((FILE *));
+extern DL_IMPORT(void) _Py_ResetReferences Py_PROTO((void));
#endif
#ifndef Py_TRACE_REFS
op->ob_type = &Arraytype;
op->ob_size = size;
op->ob_descr = descr;
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
return (PyObject *) op;
}
/* much too complicated if Py_TRACE_REFS defined */
extern long _Py_RefTotal;
inst->ob_type = &PyInstance_Type;
- _Py_NewReference(inst);
+ _Py_NewReference((PyObject *)inst);
_Py_RefTotal--; /* compensate for increment in NEWREF */
#ifdef COUNT_ALLOCS
inst->ob_type->tp_alloc--; /* ditto */
#ifdef COUNT_ALLOCS
inst->ob_type->tp_free--; /* compensate for increment in UNREF */
#endif
- _Py_ForgetReference(inst);
+ _Py_ForgetReference((PyObject *)inst);
inst->ob_type = NULL;
#endif /* Py_TRACE_REFS */
Py_DECREF(inst->in_class);
if (im != NULL) {
free_list = (PyMethodObject *)(im->im_self);
im->ob_type = &PyMethod_Type;
- _Py_NewReference(im);
+ _Py_NewReference((PyObject *)im);
}
else {
im = PyObject_NEW(PyMethodObject, &PyMethod_Type);
return PyErr_NoMemory();
op->ob_type = &PyComplex_Type;
op->cval = cval;
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
return (PyObject *) op;
}
free_list = (PyFloatObject *)op->ob_type;
op->ob_type = &PyFloat_Type;
op->ob_fval = fval;
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
return (PyObject *) op;
}
if (f == NULL)
return (PyFrameObject *)PyErr_NoMemory();
f->ob_type = &PyFrame_Type;
- _Py_NewReference(f);
+ _Py_NewReference((PyObject *)f);
}
else {
f = free_list;
else
extras = f->f_nlocals + f->f_stacksize;
f->ob_type = &PyFrame_Type;
- _Py_NewReference(f);
+ _Py_NewReference((PyObject *)f);
}
if (builtins == NULL) {
/* No builtins! Make up a minimal one. */
free_list = (PyIntObject *)v->ob_type;
v->ob_type = &PyInt_Type;
v->ob_ival = ival;
- _Py_NewReference(v);
+ _Py_NewReference((PyObject *)v);
#if NSMALLNEGINTS + NSMALLPOSINTS > 0
if (-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS) {
/* save this one for a following allocation */
op->ob_size = size;
for (i = 0; i < size; i++)
op->ob_item[i] = NULL;
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
return (PyObject *) op;
}
if (op != NULL) {
free_list = (PyCFunctionObject *)(op->m_self);
op->ob_type = &PyCFunction_Type;
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
}
else {
op = PyObject_NEW(PyCFunctionObject, &PyCFunction_Type);
#include "Python.h"
#if defined( Py_TRACE_REFS ) || defined( Py_REF_DEBUG )
-long _Py_RefTotal;
+DL_IMPORT(long) _Py_RefTotal;
#endif
/* Object allocation routines used by NEWOBJ and NEWVAROBJ macros.
return (PyVarObject *)PyErr_NoMemory();
op->ob_type = tp;
op->ob_size = size;
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
return op;
}
_Py_ForgetReference(op)
register PyObject *op;
{
+#ifdef SLOW_UNREF_CHECK
register PyObject *p;
+#endif
if (op->ob_refcnt < 0)
Py_FatalError("UNREF negative refcnt");
if (op == &refchain ||
#ifdef INTERN_STRINGS
op->ob_sinterned = NULL;
#endif
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
if (str != NULL)
memcpy(op->ob_sval, str, size);
op->ob_sval[size] = '\0';
#ifdef INTERN_STRINGS
op->ob_sinterned = NULL;
#endif
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
strcpy(op->ob_sval, str);
#ifndef DONT_SHARE_SHORT_STRINGS
if (size == 0) {
#ifdef INTERN_STRINGS
op->ob_sinterned = NULL;
#endif
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
memcpy(op->ob_sval, a->ob_sval, (int) a->ob_size);
memcpy(op->ob_sval + a->ob_size, b->ob_sval, (int) b->ob_size);
op->ob_sval[size] = '\0';
#ifdef INTERN_STRINGS
op->ob_sinterned = NULL;
#endif
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
for (i = 0; i < size; i += a->ob_size)
memcpy(op->ob_sval+i, a->ob_sval, (int) a->ob_size);
op->ob_sval[size] = '\0';
}
for (i = 0; i < size; i++)
op->ob_item[i] = NULL;
- _Py_NewReference(op);
+ _Py_NewReference((PyObject *)op);
#if MAXSAVESIZE > 0
if (size == 0) {
free_tuples[0] = op;
#ifdef Py_REF_DEBUG
--_Py_RefTotal;
#endif
- _Py_ForgetReference(v);
+ _Py_ForgetReference((PyObject *)v);
if (last_is_sticky && sizediff < 0) {
/* shrinking:
move entries to the front and zero moved entries */
PyErr_NoMemory();
return -1;
}
- _Py_NewReference(sv);
+ _Py_NewReference((PyObject *)sv);
for (i = sv->ob_size; i < newsize; i++)
sv->ob_item[i] = NULL;
if (last_is_sticky && sizediff > 0) {
#ifdef _M_IX86
#define COMPILER "[MSC 32 bit (Intel)]"
+#elif defined(_M_ALPHA)
+#define COMPILER "[MSC 32 bit (Alpha)]"
#else
#define COMPILER "[MSC (Unknown)]"
#endif
#ifndef USE_DL_EXPORT
/* So nobody needs to specify the .lib in their Makefile any more */
#ifdef _DEBUG
-#define Py_DEBUG
#pragma comment(lib,"python15_d.lib")
#else
#pragma comment(lib,"python15.lib")
#endif
#endif /* USE_DL_EXPORT */
+#ifdef _DEBUG
+#define Py_DEBUG
+#endif
+
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
static void call_sys_exitfunc Py_PROTO((void));
static void call_ll_exitfuncs Py_PROTO((void));
+#ifdef Py_TRACE_REFS
+int _Py_AskYesNo(char *prompt);
+#endif
+
int Py_DebugFlag; /* Needed by parser.c */
int Py_VerboseFlag; /* Needed by import.c */
int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
if (rv != -1) {
success = 1;
- dprintf(("%ld: PyThread_start_new_thread succeeded: %ld\n", PyThread_get_thread_ident(), aThreadId));
+ dprintf(("%ld: PyThread_start_new_thread succeeded: %ld\n", PyThread_get_thread_ident(), rv));
}
return success;