diff Python/bltinmodule.c @ 39447:71b0ac80a135 legacy-trunk

It's highly unlikely, though possible for PyEval_Get*() to return NULLs. So be safe and do an XINCREF. Klocwork # 221-222.
author Neal Norwitz <nnorwitz@gmail.com>
date Sat, 12 Aug 2006 01:46:42 +0000
parents 5009de504f92
children 97d3eab8cda2
line wrap: on
line diff
--- a/Python/bltinmodule.c	Sat Aug 12 01:45:47 2006 +0000
+++ b/Python/bltinmodule.c	Sat Aug 12 01:46:42 2006 +0000
@@ -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;
 }