Commit b7829e0e authored by Jim Fulton's avatar Jim Fulton

Should tread class-less (Grrrr Missing.Value) ExtensionClass

instances as non-persistent.
parent bd199150
...@@ -151,7 +151,11 @@ persistent_id_call(persistent_id *self, PyObject *args, PyObject *kwargs) ...@@ -151,7 +151,11 @@ persistent_id_call(persistent_id *self, PyObject *args, PyObject *kwargs)
if (! PyExtensionClass_Check(object)) if (! PyExtensionClass_Check(object))
if (PyExtensionInstance_Check(object)) if (PyExtensionInstance_Check(object))
{ {
UNLESS (klass=PyObject_GetAttr(object, py___class__)) return NULL; UNLESS (klass=PyObject_GetAttr(object, py___class__))
{
PyErr_Clear();
goto not_persistent;
}
UNLESS ( UNLESS (
PyExtensionClass_Check(klass) && PyExtensionClass_Check(klass) &&
(((PyExtensionClass*)klass)->class_flags (((PyExtensionClass*)klass)->class_flags
...@@ -306,7 +310,7 @@ void ...@@ -306,7 +310,7 @@ void
initcoptimizations() initcoptimizations()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.2 $"; char *rev="$Revision: 1.3 $";
#define make_string(S) if (! (py_ ## S=PyString_FromString(#S))) return #define make_string(S) if (! (py_ ## S=PyString_FromString(#S))) return
make_string(_p_oid); make_string(_p_oid);
......
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