summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-05-22 00:57:31 (GMT)
committerGuido van Rossum <guido@python.org>1998-05-22 00:57:31 (GMT)
commitb88679b2a4956109e11df64f463fdc36b4c1d67d (patch)
treec2ab58e1f4ac52d511a8e5d348718a06203464a4 /Modules
parentc8498dc604424d305d3ea53ee96a758aae017624 (diff)
downloadcpython-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.c2
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;