Commit e9424316 authored by Toby Dickenson's avatar Toby Dickenson

fixed dumb premature DECREF bug

parent c57189e3
...@@ -88,7 +88,7 @@ process must skip such objects, rather than deactivating them. ...@@ -88,7 +88,7 @@ process must skip such objects, rather than deactivating them.
static char cPickleCache_doc_string[] = static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n" "Defines the PickleCache used by ZODB Connection objects.\n"
"\n" "\n"
"$Id: cPickleCache.c,v 1.62 2002/04/18 09:16:24 htrd Exp $\n"; "$Id: cPickleCache.c,v 1.63 2002/04/18 09:18:26 htrd Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;} #define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E)) #define UNLESS(E) if(!(E))
...@@ -834,12 +834,12 @@ cc_add_item(ccobject *self, PyObject *key, PyObject *v) ...@@ -834,12 +834,12 @@ cc_add_item(ccobject *self, PyObject *key, PyObject *v)
jar = PyObject_GetAttr(v, py__p_jar); jar = PyObject_GetAttr(v, py__p_jar);
if (jar == NULL) if (jar == NULL)
return -1; return -1;
Py_DECREF(jar);
if (jar==Py_None) { if (jar==Py_None) {
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"Cached object jar missing"); "Cached object jar missing");
return -1; return -1;
} }
Py_DECREF(jar);
object_again = object_from_oid(self, key); object_again = object_from_oid(self, key);
if (object_again) { if (object_again) {
......
...@@ -88,7 +88,7 @@ process must skip such objects, rather than deactivating them. ...@@ -88,7 +88,7 @@ process must skip such objects, rather than deactivating them.
static char cPickleCache_doc_string[] = static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n" "Defines the PickleCache used by ZODB Connection objects.\n"
"\n" "\n"
"$Id: cPickleCache.c,v 1.62 2002/04/18 09:16:24 htrd Exp $\n"; "$Id: cPickleCache.c,v 1.63 2002/04/18 09:18:26 htrd Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;} #define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E)) #define UNLESS(E) if(!(E))
...@@ -834,12 +834,12 @@ cc_add_item(ccobject *self, PyObject *key, PyObject *v) ...@@ -834,12 +834,12 @@ cc_add_item(ccobject *self, PyObject *key, PyObject *v)
jar = PyObject_GetAttr(v, py__p_jar); jar = PyObject_GetAttr(v, py__p_jar);
if (jar == NULL) if (jar == NULL)
return -1; return -1;
Py_DECREF(jar);
if (jar==Py_None) { if (jar==Py_None) {
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"Cached object jar missing"); "Cached object jar missing");
return -1; return -1;
} }
Py_DECREF(jar);
object_again = object_from_oid(self, key); object_again = object_from_oid(self, key);
if (object_again) { if (object_again) {
......
...@@ -88,7 +88,7 @@ process must skip such objects, rather than deactivating them. ...@@ -88,7 +88,7 @@ process must skip such objects, rather than deactivating them.
static char cPickleCache_doc_string[] = static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n" "Defines the PickleCache used by ZODB Connection objects.\n"
"\n" "\n"
"$Id: cPickleCache.c,v 1.62 2002/04/18 09:16:24 htrd Exp $\n"; "$Id: cPickleCache.c,v 1.63 2002/04/18 09:18:26 htrd Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;} #define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E)) #define UNLESS(E) if(!(E))
...@@ -834,12 +834,12 @@ cc_add_item(ccobject *self, PyObject *key, PyObject *v) ...@@ -834,12 +834,12 @@ cc_add_item(ccobject *self, PyObject *key, PyObject *v)
jar = PyObject_GetAttr(v, py__p_jar); jar = PyObject_GetAttr(v, py__p_jar);
if (jar == NULL) if (jar == NULL)
return -1; return -1;
Py_DECREF(jar);
if (jar==Py_None) { if (jar==Py_None) {
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"Cached object jar missing"); "Cached object jar missing");
return -1; return -1;
} }
Py_DECREF(jar);
object_again = object_from_oid(self, key); object_again = object_from_oid(self, key);
if (object_again) { if (object_again) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment