[Zodb-checkins] CVS: Zope3/lib/python/Persistence - cPersistence.c:1.1.2.10

Jeremy Hylton jeremy@zope.com
Mon, 4 Mar 2002 15:59:55 -0500


Update of /cvs-repository/Zope3/lib/python/Persistence
In directory cvs.zope.org:/tmp/cvs-serv7986

Modified Files:
      Tag: Zope-3x-branch
	cPersistence.c 
Log Message:
Remove HEAPTYPE definition.
Remove __safe_for_unpickling__ attribute.
Add module name to Persistent tp_name slot.

The first two were not necessary for pickling.  The last one was.


=== Zope3/lib/python/Persistence/cPersistence.c 1.1.2.9 => 1.1.2.10 ===
     {"_p_changed", (getter)persist_get_state, (setter)persist_set_state},
     {"__dict__", (getter)persist_get_dict},
-
-    /* XXX This seems to be necessary for unpickling via reduce. */
-    {"__safe_for_unpickling__", (getter)persist_safe},
     {NULL}
 };
 
@@ -632,7 +629,7 @@
 static PyTypeObject PyPersist_Type = {
     PyObject_HEAD_INIT(DEFERRED_ADDRESS(&PyType_Type))
     0,					/* ob_size */
-    "Persistent",			/* tp_name */
+    "Persistence.Persistent",		/* tp_name */
     sizeof(PyPersistObject),		/* tp_basicsize */
     0,					/* tp_itemsize */
     (destructor)persist_dealloc,	/* tp_dealloc */
@@ -650,7 +647,7 @@
     (getattrofunc)persist_getattro,	/* tp_getattro */
     (setattrofunc)persist_setattro,	/* tp_setattro */
     0,					/* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HEAPTYPE |
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
     Py_TPFLAGS_BASETYPE, 		/* tp_flags */
     0,					/* tp_doc */
     (traverseproc)persist_traverse,	/* tp_traverse */