Skip to content

Commit 11a2028

Browse files
author
neal.norwitz
committed
Closure can't be NULL at this point since we know it's a tuple.
Reported by Klocwork # 74. git-svn-id: http://svn.python.org/projects/python/trunk@50857 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 3fa1d20 commit 11a2028

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/funcobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ PyFunction_SetClosure(PyObject *op, PyObject *closure)
141141
if (closure == Py_None)
142142
closure = NULL;
143143
else if (PyTuple_Check(closure)) {
144-
Py_XINCREF(closure);
144+
Py_INCREF(closure);
145145
}
146146
else {
147147
PyErr_Format(PyExc_SystemError,

0 commit comments

Comments
 (0)