Skip to content

Commit dadf407

Browse files
author
martin.v.loewis
committed
Use Py_ssize_t for field sizes and offsets.
git-svn-id: http://svn.python.org/projects/python/trunk@42410 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 56cc41a commit dadf407

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Include/object.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ typedef PyObject *(*allocfunc)(struct _typeobject *, Py_ssize_t);
258258
typedef struct _typeobject {
259259
PyObject_VAR_HEAD
260260
const char *tp_name; /* For printing, in format "<module>.<name>" */
261-
int tp_basicsize, tp_itemsize; /* For allocation */
261+
Py_ssize_t tp_basicsize, tp_itemsize; /* For allocation */
262262

263263
/* Methods to implement standard operations */
264264

@@ -303,7 +303,7 @@ typedef struct _typeobject {
303303
richcmpfunc tp_richcompare;
304304

305305
/* weak reference enabler */
306-
long tp_weaklistoffset;
306+
Py_ssize_t tp_weaklistoffset;
307307

308308
/* Added in release 2.2 */
309309
/* Iterators */
@@ -318,7 +318,7 @@ typedef struct _typeobject {
318318
PyObject *tp_dict;
319319
descrgetfunc tp_descr_get;
320320
descrsetfunc tp_descr_set;
321-
long tp_dictoffset;
321+
Py_ssize_t tp_dictoffset;
322322
initproc tp_init;
323323
allocfunc tp_alloc;
324324
newfunc tp_new;

0 commit comments

Comments
 (0)