diff options
author | Guido van Rossum <guido@python.org> | 2001-08-17 12:07:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-17 12:07:34 (GMT) |
commit | cdf0d75897ddde0b27bad24aac4845824578f5ee (patch) | |
tree | 41b8b5b4b5eddfa57cb804527cd3552d148ba7c6 /Objects | |
parent | 7e1ff69271413a61c69edb24de214895cdaa1fec (diff) | |
download | cpython-cdf0d75897ddde0b27bad24aac4845824578f5ee.zip cpython-cdf0d75897ddde0b27bad24aac4845824578f5ee.tar.gz cpython-cdf0d75897ddde0b27bad24aac4845824578f5ee.tar.bz2 |
Instance methods: allow a NULL value for im_class.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/classobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 82eb1d5..b4944f3 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -1973,7 +1973,7 @@ PyMethod_New(PyObject *func, PyObject *self, PyObject *class) im->im_func = func; Py_XINCREF(self); im->im_self = self; - Py_INCREF(class); + Py_XINCREF(class); im->im_class = class; PyObject_GC_Init(im); return (PyObject *)im; @@ -2040,7 +2040,7 @@ instancemethod_dealloc(register PyMethodObject *im) PyObject_GC_Fini(im); Py_DECREF(im->im_func); Py_XDECREF(im->im_self); - Py_DECREF(im->im_class); + Py_XDECREF(im->im_class); im->im_self = (PyObject *)free_list; free_list = im; } |