make newvarobj's size arg signed
This commit is contained in:
parent
10f8efd87a
commit
b7d3d4e5d6
|
@ -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];
|
||||
};
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue