Kaydet (Commit) cdf0d758 authored tarafından Guido van Rossum's avatar Guido van Rossum

Instance methods: allow a NULL value for im_class.

üst 7e1ff692
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment