[Zope-dev] possible problem in cPickleCache.c
Robin Becker
robin@jessikat.demon.co.uk
Wed, 14 Jul 1999 01:09:55 +0100
My C compiler gives me a warning which on inspection I believe about an
uninitialized variable usage at cPickleCache.c line 392. The code is
static PyObject *
cc_invalidate(ccobject *self, PyObject *args)
{
PyObject *inv, *key, *v;
int i;
if (PyArg_ParseTuple(args, "O!", &PyDict_Type, &inv)) {
for (i=0; PyDict_Next(inv, &i, &key, &v); )
if (key==Py_None)
{ /* Eek some nitwit invalidated everything! */
for (i=0; PyDict_Next(self->data, &i, &key, &v); )
_invalidate(self, key);
break;
}
else
_invalidate(self, key);
PyDict_Clear(inv);
}
else {
PyErr_Clear();
UNLESS (PyArg_ParseTuple(args, "O", &inv)) return NULL;
if (PyString_Check(inv))
_invalidate(self, key); /*possible error*/
else if (inv==Py_None) /* All */
for (i=0; PyDict_Next(self->data, &i, &key, &v); )
_invalidate(self, key);
else {
int l;
--
Robin Becker