The rest of the changes by Trent Mick and Dale Nagata for warning-free
compilation on NT Alpha. Mostly added casts etc.
This commit is contained in:
parent
e0a928dc1e
commit
bffd683f73
|
@ -362,6 +362,7 @@ extern DL_IMPORT(void) _Py_Dealloc Py_PROTO((PyObject *));
|
|||
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
|
||||
|
|
|
@ -363,7 +363,7 @@ newarrayobject(size, descr)
|
|||
op->ob_type = &Arraytype;
|
||||
op->ob_size = size;
|
||||
op->ob_descr = descr;
|
||||
_Py_NewReference(op);
|
||||
_Py_NewReference((PyObject *)op);
|
||||
return (PyObject *) op;
|
||||
}
|
||||
|
||||
|
|
|
@ -504,7 +504,7 @@ instance_dealloc(inst)
|
|||
/* 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 */
|
||||
|
@ -556,7 +556,7 @@ instance_dealloc(inst)
|
|||
#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);
|
||||
|
@ -1431,7 +1431,7 @@ PyMethod_New(func, self, 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);
|
||||
|
|
|
@ -172,7 +172,7 @@ PyComplex_FromCComplex(cval)
|
|||
return PyErr_NoMemory();
|
||||
op->ob_type = &PyComplex_Type;
|
||||
op->cval = cval;
|
||||
_Py_NewReference(op);
|
||||
_Py_NewReference((PyObject *)op);
|
||||
return (PyObject *) op;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ PyFloat_FromDouble(fval)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ PyFrame_New(tstate, code, globals, locals)
|
|||
if (f == NULL)
|
||||
return (PyFrameObject *)PyErr_NoMemory();
|
||||
f->ob_type = &PyFrame_Type;
|
||||
_Py_NewReference(f);
|
||||
_Py_NewReference((PyObject *)f);
|
||||
}
|
||||
else {
|
||||
f = free_list;
|
||||
|
@ -199,7 +199,7 @@ PyFrame_New(tstate, code, globals, locals)
|
|||
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. */
|
||||
|
|
|
@ -168,7 +168,7 @@ PyInt_FromLong(ival)
|
|||
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 */
|
||||
|
|
|
@ -88,7 +88,7 @@ PyList_New(size)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ PyCFunction_New(ml, self)
|
|||
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);
|
||||
|
|
|
@ -34,7 +34,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||
#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.
|
||||
|
@ -149,7 +149,7 @@ _PyObject_NewVar(tp, size, op)
|
|||
return (PyVarObject *)PyErr_NoMemory();
|
||||
op->ob_type = tp;
|
||||
op->ob_size = size;
|
||||
_Py_NewReference(op);
|
||||
_Py_NewReference((PyObject *)op);
|
||||
return op;
|
||||
}
|
||||
|
||||
|
@ -651,7 +651,9 @@ void
|
|||
_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 ||
|
||||
|
|
|
@ -104,7 +104,7 @@ PyString_FromStringAndSize(str, size)
|
|||
#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';
|
||||
|
@ -154,7 +154,7 @@ PyString_FromString(str)
|
|||
#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) {
|
||||
|
@ -317,7 +317,7 @@ string_concat(a, bb)
|
|||
#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';
|
||||
|
@ -352,7 +352,7 @@ string_repeat(a, n)
|
|||
#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';
|
||||
|
|
|
@ -100,7 +100,7 @@ PyTuple_New(size)
|
|||
}
|
||||
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;
|
||||
|
@ -452,7 +452,7 @@ _PyTuple_Resize(pv, newsize, last_is_sticky)
|
|||
#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 */
|
||||
|
@ -475,7 +475,7 @@ _PyTuple_Resize(pv, newsize, last_is_sticky)
|
|||
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) {
|
||||
|
|
|
@ -61,6 +61,8 @@ you must define MS_NO_COREDLL (do not test this macro) */
|
|||
|
||||
#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
|
||||
|
@ -213,13 +215,16 @@ typedef int pid_t;
|
|||
#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
|
||||
|
|
|
@ -72,6 +72,10 @@ static void initsigs Py_PROTO((void));
|
|||
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 */
|
||||
|
|
|
@ -65,7 +65,7 @@ int PyThread_start_new_thread(void (*func)(void *), void *arg)
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue