diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-21 05:29:58 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-21 05:29:58 (GMT) |
commit | 48808a1d6c3996ed06e904becdfb4cfadbef09cb (patch) | |
tree | d261edceeaa02933a83d6090b9120557a956159b /Objects | |
parent | dc57936b63043ad4f1bbb85e91399b02b7b22f21 (diff) | |
download | cpython-48808a1d6c3996ed06e904becdfb4cfadbef09cb.zip cpython-48808a1d6c3996ed06e904becdfb4cfadbef09cb.tar.gz cpython-48808a1d6c3996ed06e904becdfb4cfadbef09cb.tar.bz2 |
Add some asserts that we got good params passed
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/dictobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index c02f1b2..705be07 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -599,6 +599,8 @@ PyDict_SetItem(register PyObject *op, PyObject *key, PyObject *value) PyErr_BadInternalCall(); return -1; } + assert(key); + assert(value); mp = (dictobject *)op; if (PyString_CheckExact(key)) { hash = ((PyStringObject *)key)->ob_shash; @@ -647,6 +649,7 @@ PyDict_DelItem(PyObject *op, PyObject *key) PyErr_BadInternalCall(); return -1; } + assert(key); if (!PyString_CheckExact(key) || (hash = ((PyStringObject *) key)->ob_shash) == -1) { hash = PyObject_Hash(key); |