I think there was a tiny bug in new_function() -- the 'defaults'
argument was initialized to Py_None, but later checked for NULL. Consistently use Py_None.
This commit is contained in:
parent
c8498dc604
commit
b88679b2a4
|
@ -109,7 +109,7 @@ new_function(unused, args)
|
|||
Py_XDECREF(newfunc->func_name);
|
||||
newfunc->func_name = name;
|
||||
}
|
||||
if (defaults != NULL) {
|
||||
if (defaults != Py_None) {
|
||||
Py_XINCREF(defaults);
|
||||
Py_XDECREF(newfunc->func_defaults);
|
||||
newfunc->func_defaults = defaults;
|
||||
|
|
Loading…
Reference in New Issue