diff options
author | Guido van Rossum <guido@python.org> | 1998-05-22 00:57:31 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-05-22 00:57:31 (GMT) |
commit | b88679b2a4956109e11df64f463fdc36b4c1d67d (patch) | |
tree | c2ab58e1f4ac52d511a8e5d348718a06203464a4 /Modules | |
parent | c8498dc604424d305d3ea53ee96a758aae017624 (diff) | |
download | cpython-b88679b2a4956109e11df64f463fdc36b4c1d67d.zip cpython-b88679b2a4956109e11df64f463fdc36b4c1d67d.tar.gz cpython-b88679b2a4956109e11df64f463fdc36b4c1d67d.tar.bz2 |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/newmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/newmodule.c b/Modules/newmodule.c index 7446b97..cfe7883 100644 --- a/Modules/newmodule.c +++ b/Modules/newmodule.c @@ -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; |