From 41290685f9d5c7aed544bd5db90914ab82f9d213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 16 Feb 2006 14:56:14 +0000 Subject: [PATCH] Change _PyObject_GC_Resize to expect Py_ssize_t. --- Include/objimpl.h | 2 +- Modules/gcmodule.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/objimpl.h b/Include/objimpl.h index a168c8b47b2..ed521fe5568 100644 --- a/Include/objimpl.h +++ b/Include/objimpl.h @@ -238,7 +238,7 @@ PyAPI_FUNC(long) PyGC_Collect(void); #define PyObject_IS_GC(o) (PyType_IS_GC((o)->ob_type) && \ ((o)->ob_type->tp_is_gc == NULL || (o)->ob_type->tp_is_gc(o))) -PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, int); +PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); #define PyObject_GC_Resize(type, op, n) \ ( (type *) _PyObject_GC_Resize((PyVarObject *)(op), (n)) ) diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 4902eb52705..42dfa1532bf 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -1284,7 +1284,7 @@ _PyObject_GC_NewVar(PyTypeObject *tp, Py_ssize_t nitems) } PyVarObject * -_PyObject_GC_Resize(PyVarObject *op, int nitems) +_PyObject_GC_Resize(PyVarObject *op, Py_ssize_t nitems) { const size_t basicsize = _PyObject_VAR_SIZE(op->ob_type, nitems); PyGC_Head *g = AS_GC(op);