mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue