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:
Guido van Rossum 1998-05-22 00:57:31 +00:00
parent c8498dc604
commit b88679b2a4
1 changed files with 1 additions and 1 deletions

View File

@ -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;