Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e36dce6

Browse files
committed
Make ob_refcnt and tp_maxalloc (and friends) Py_ssize_t.
1 parent 68bc4f9 commit e36dce6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Include/object.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ whose size is determined when the object is allocated.
7777
/* PyObject_HEAD defines the initial segment of every PyObject. */
7878
#define PyObject_HEAD \
7979
_PyObject_HEAD_EXTRA \
80-
int ob_refcnt; \
80+
Py_ssize_t ob_refcnt; \
8181
struct _typeobject *ob_type;
8282

8383
#define PyObject_HEAD_INIT(type) \
@@ -333,9 +333,9 @@ typedef struct _typeobject {
333333

334334
#ifdef COUNT_ALLOCS
335335
/* these must be last and never explicitly initialized */
336-
int tp_allocs;
337-
int tp_frees;
338-
int tp_maxalloc;
336+
Py_ssize_t tp_allocs;
337+
Py_ssize_t tp_frees;
338+
Py_ssize_t tp_maxalloc;
339339
struct _typeobject *tp_next;
340340
#endif
341341
} PyTypeObject;

0 commit comments

Comments
 (0)