[Python-checkins] r50741 - python/trunk/Objects/dictobject.c

neal.norwitz python-checkins at python.org
Fri Jul 21 07:29:58 CEST 2006


Author: neal.norwitz
Date: Fri Jul 21 07:29:58 2006
New Revision: 50741

Modified:
   python/trunk/Objects/dictobject.c
Log:
Add some asserts that we got good params passed

Modified: python/trunk/Objects/dictobject.c
==============================================================================
--- python/trunk/Objects/dictobject.c	(original)
+++ python/trunk/Objects/dictobject.c	Fri Jul 21 07:29:58 2006
@@ -599,6 +599,8 @@
 		PyErr_BadInternalCall();
 		return -1;
 	}
+	assert(key);
+	assert(value);
 	mp = (dictobject *)op;
 	if (PyString_CheckExact(key)) {
 		hash = ((PyStringObject *)key)->ob_shash;
@@ -647,6 +649,7 @@
 		PyErr_BadInternalCall();
 		return -1;
 	}
+	assert(key);
 	if (!PyString_CheckExact(key) ||
 	    (hash = ((PyStringObject *) key)->ob_shash) == -1) {
 		hash = PyObject_Hash(key);


More information about the Python-checkins mailing list