[Python-checkins] r51433 - python/trunk/Python/compile.c

neal.norwitz python-checkins at python.org
Mon Aug 21 20:01:31 CEST 2006


Author: neal.norwitz
Date: Mon Aug 21 20:01:30 2006
New Revision: 51433

Modified:
   python/trunk/Python/compile.c
Log:
Add assert to make Klocwork happy (#276)


Modified: python/trunk/Python/compile.c
==============================================================================
--- python/trunk/Python/compile.c	(original)
+++ python/trunk/Python/compile.c	Mon Aug 21 20:01:30 2006
@@ -568,6 +568,7 @@
 	if (n >= 0) {
 		wrapper = PyList_GET_ITEM(c->c_stack, n);
 		c->u = (struct compiler_unit *)PyCObject_AsVoidPtr(wrapper);
+		assert(c->u);
 		/* we are deleting from a list so this really shouldn't fail */
 		if (PySequence_DelItem(c->c_stack, n) < 0)
 			Py_FatalError("compiler_exit_scope()");


More information about the Python-checkins mailing list