summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-07-01 01:00:38 (GMT)
committerGuido van Rossum <guido@python.org>2000-07-01 01:00:38 (GMT)
commit4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe (patch)
tree33188a2be2a6d62e6f647f842303aa80ce9de474 /Objects/classobject.c
parentce8e1dc39531c8bed47cef0dd9d05bd3e9c0bd66 (diff)
downloadcpython-4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe.zip
cpython-4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe.tar.gz
cpython-4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe.tar.bz2
Neil Schemenauer: small fixes for GC
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 4a7de7b..4f73ff8 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -128,6 +128,7 @@ class_dealloc(op)
Py_XDECREF(op->cl_getattr);
Py_XDECREF(op->cl_setattr);
Py_XDECREF(op->cl_delattr);
+ op = (PyClassObject *) PyObject_AS_GC(op);
PyObject_DEL(op);
}
@@ -473,6 +474,7 @@ PyInstance_New(class, arg, kw)
inst->in_dict = PyDict_New();
PyObject_GC_Init(inst);
if (inst->in_dict == NULL) {
+ inst = (PyInstanceObject *) PyObject_AS_GC(inst);
PyObject_DEL(inst);
return NULL;
}
@@ -588,6 +590,7 @@ instance_dealloc(inst)
#endif /* Py_TRACE_REFS */
Py_DECREF(inst->in_class);
Py_XDECREF(inst->in_dict);
+ inst = (PyInstanceObject *) PyObject_AS_GC(inst);
PyObject_DEL(inst);
}
@@ -1763,6 +1766,7 @@ PyMethod_Fini()
while (free_list) {
PyMethodObject *im = free_list;
free_list = (PyMethodObject *)(im->im_self);
+ im = (PyMethodObject *) PyObject_AS_GC(im);
PyObject_DEL(im);
}
}