diff options
-rw-r--r-- | Objects/intobject.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c index 5886209..58a6beb 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -130,6 +130,13 @@ int_dealloc(PyIntObject *v) v->ob_type->tp_free((PyObject *)v); } +static void +int_free(PyIntObject *v) +{ + v->ob_type = (struct _typeobject *)free_list; + free_list = v; +} + long PyInt_AsLong(register PyObject *op) { @@ -905,6 +912,7 @@ PyTypeObject PyInt_Type = { 0, /* tp_init */ 0, /* tp_alloc */ int_new, /* tp_new */ + (freefunc)int_free, /* tp_free */ }; void |