From: Guido van Rossum Date: Fri, 10 Feb 1995 16:55:33 +0000 (+0000) Subject: make newvarobj's size arg signed X-Git-Tag: v1.2b3~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7d3d4e5d6ab4f74f7c30f2f0bade59ef7b7cb7d;p=thirdparty%2FPython%2Fcpython.git make newvarobj's size arg signed --- diff --git a/Include/longintrepr.h b/Include/longintrepr.h index a5b1b364ffd9..2a911c24c361 100644 --- a/Include/longintrepr.h +++ b/Include/longintrepr.h @@ -62,7 +62,7 @@ typedef long stwodigits; /* signed variant of twodigits */ struct _longobject { PyObject_HEAD - int ob_size; /* XXX Hack! newvarobj() stores it as unsigned! */ + int ob_size; digit ob_digit[1]; }; diff --git a/Include/objimpl.h b/Include/objimpl.h index cb27c7c5e69c..139e3377ae3f 100644 --- a/Include/objimpl.h +++ b/Include/objimpl.h @@ -48,7 +48,7 @@ n * tp_itemsize. This fills in the ob_size field as well. */ extern PyObject *_PyObject_New Py_PROTO((PyTypeObject *)); -extern varobject *_PyObject_NewVar Py_PROTO((PyTypeObject *, unsigned int)); +extern varobject *_PyObject_NewVar Py_PROTO((PyTypeObject *, int)); #define PyObject_NEW(type, typeobj) ((type *) _PyObject_New(typeobj)) #define PyObject_NEW_VAR(type, typeobj, n) ((type *) _PyObject_NewVar(typeobj, n))