Commit e36dce69 authored by Martin v. Löwis's avatar Martin v. Löwis

Make ob_refcnt and tp_maxalloc (and friends) Py_ssize_t.

parent 68bc4f9a
...@@ -77,7 +77,7 @@ whose size is determined when the object is allocated. ...@@ -77,7 +77,7 @@ whose size is determined when the object is allocated.
/* PyObject_HEAD defines the initial segment of every PyObject. */ /* PyObject_HEAD defines the initial segment of every PyObject. */
#define PyObject_HEAD \ #define PyObject_HEAD \
_PyObject_HEAD_EXTRA \ _PyObject_HEAD_EXTRA \
int ob_refcnt; \ Py_ssize_t ob_refcnt; \
struct _typeobject *ob_type; struct _typeobject *ob_type;
#define PyObject_HEAD_INIT(type) \ #define PyObject_HEAD_INIT(type) \
...@@ -333,9 +333,9 @@ typedef struct _typeobject { ...@@ -333,9 +333,9 @@ typedef struct _typeobject {
#ifdef COUNT_ALLOCS #ifdef COUNT_ALLOCS
/* these must be last and never explicitly initialized */ /* these must be last and never explicitly initialized */
int tp_allocs; Py_ssize_t tp_allocs;
int tp_frees; Py_ssize_t tp_frees;
int tp_maxalloc; Py_ssize_t tp_maxalloc;
struct _typeobject *tp_next; struct _typeobject *tp_next;
#endif #endif
} PyTypeObject; } PyTypeObject;
......
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