diff Python/bltinmodule.c @ 40017:3b57eecdc504 2.4

[Backport r51220 | neal.norwitz] It's highly unlikely, though possible for PyEval_Get*() to return NULLs. So be safe and do an XINCREF. Klocwork # 221-222.
author Andrew M. Kuchling <amk@amk.ca>
date Thu, 05 Oct 2006 19:01:50 +0000
parents c11cae2b9a75
children 0565130d7d9f
line wrap: on
line diff
--- a/Python/bltinmodule.c	Thu Oct 05 18:57:54 2006 +0000
+++ b/Python/bltinmodule.c	Thu Oct 05 19:01:50 2006 +0000
@@ -687,7 +687,7 @@
 	PyObject *d;
 
 	d = PyEval_GetGlobals();
-	Py_INCREF(d);
+	Py_XINCREF(d);
 	return d;
 }
 
@@ -1118,7 +1118,7 @@
 	PyObject *d;
 
 	d = PyEval_GetLocals();
-	Py_INCREF(d);
+	Py_XINCREF(d);
 	return d;
 }