make newvarobj's size arg signed

This commit is contained in:
Guido van Rossum 1995-02-10 16:55:33 +00:00
parent 10f8efd87a
commit b7d3d4e5d6
2 changed files with 2 additions and 2 deletions

View File

@ -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];
};

View File

@ -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))