[Python-checkins] r51220 - python/trunk/Python/bltinmodule.c

neal.norwitz python-checkins at python.org
Sat Aug 12 03:46:43 CEST 2006


Author: neal.norwitz
Date: Sat Aug 12 03:46:42 2006
New Revision: 51220

Modified:
   python/trunk/Python/bltinmodule.c
Log:
It's highly unlikely, though possible for PyEval_Get*() to return NULLs.
So be safe and do an XINCREF.

Klocwork # 221-222.


Modified: python/trunk/Python/bltinmodule.c
==============================================================================
--- python/trunk/Python/bltinmodule.c	(original)
+++ python/trunk/Python/bltinmodule.c	Sat Aug 12 03:46:42 2006
@@ -759,7 +759,7 @@
 	PyObject *d;
 
 	d = PyEval_GetGlobals();
-	Py_INCREF(d);
+	Py_XINCREF(d);
 	return d;
 }
 
@@ -1190,7 +1190,7 @@
 	PyObject *d;
 
 	d = PyEval_GetLocals();
-	Py_INCREF(d);
+	Py_XINCREF(d);
 	return d;
 }
 


More information about the Python-checkins mailing list