Mercurial > cpython-lru_cache-weakref
diff Objects/funcobject.c @ 44026:48af6375207e
Removed the API to create unbound methods and simplified the API for bound methods. The signature is PyMethod_New(func, instance).
Also removed im_class and renamed im_self to __self__ and im_func to __func__. im_class can be substituted with method.__self__.__class__.
I've also updated some parts of the documenation.
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Tue, 27 Nov 2007 10:40:20 +0000 |
| parents | ff5df1fc0fcc |
| children | 86a2679dca46 |
line wrap: on
line diff
--- a/Objects/funcobject.c Mon Nov 26 23:23:18 2007 +0000 +++ b/Objects/funcobject.c Tue Nov 27 10:40:20 2007 +0000 @@ -647,7 +647,7 @@ Py_INCREF(func); return func; } - return PyMethod_New(func, obj, type); + return PyMethod_New(func, obj); } PyTypeObject PyFunction_Type = { @@ -751,8 +751,7 @@ } if (type == NULL) type = (PyObject *)(Py_Type(obj)); - return PyMethod_New(cm->cm_callable, - type, (PyObject *)(Py_Type(type))); + return PyMethod_New(cm->cm_callable, type); } static int
