Kaydet (Commit) b7d3d4e5 authored tarafından Guido van Rossum's avatar Guido van Rossum

make newvarobj's size arg signed

üst 10f8efd8
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment