Commit d314a71d authored by 's avatar

Added updated copt with wrapper checking to the trunk

parent 997edb2a
......@@ -163,6 +163,18 @@ persistent_id_call(persistent_id *self, PyObject *args, PyObject *kwargs)
& PERSISTENT_TYPE_FLAG)
)
goto not_persistent;
if (OBJECT(object->ob_type) != klass)
{ /* Wrapped object, whine! */
/*
printf("%s != %s\n",
object->ob_type->tp_name,
(((PyExtensionClass*)klass)->tp_name));
*/
PyErr_SetString(InvalidObjectReference,
"Attempt to store a wrapped persistent object");
return NULL;
}
}
else
goto not_persistent;
......@@ -307,7 +319,7 @@ void
initcoptimizations()
{
PyObject *m, *d;
char *rev="$Revision: 1.6 $";
char *rev="$Revision: 1.7 $";
#define make_string(S) if (! (py_ ## S=PyString_FromString(#S))) return
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