mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
parent
91c77301bf
commit
4a22b5dee7
19 changed files with 65 additions and 115 deletions
|
|
@ -643,8 +643,10 @@ function_call(PyObject *func, PyObject *arg, PyObject *kw)
|
|||
static PyObject *
|
||||
func_descr_get(PyObject *func, PyObject *obj, PyObject *type)
|
||||
{
|
||||
if (obj == Py_None)
|
||||
obj = NULL;
|
||||
if (obj == Py_None || obj == NULL) {
|
||||
Py_INCREF(func);
|
||||
return func;
|
||||
}
|
||||
return PyMethod_New(func, obj, type);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue