[Zodb-checkins] CVS: Zope3/src/persistent - __init__.py:1.6.8.1 cPersistence.c:1.75.2.1 cPersistence.h:1.27.10.1

Jim Fulton jim at zope.com
Fri Jan 9 17:23:56 EST 2004


Update of /cvs-repository/Zope3/src/persistent
In directory cvs.zope.org:/tmp/cvs-serv25080/src/persistent

Modified Files:
      Tag: zope3-zodb3-devel-branch
	__init__.py cPersistence.c cPersistence.h 
Log Message:
Checkpointing to the branch after beginning the process of removing
zodb 4 code. 

Lots of things are now broken. :)




=== Zope3/src/persistent/__init__.py 1.6 => 1.6.8.1 ===
--- Zope3/src/persistent/__init__.py:1.6	Fri Nov 28 11:44:55 2003
+++ Zope3/src/persistent/__init__.py	Fri Jan  9 17:23:24 2004
@@ -15,3 +15,13 @@
 
 from cPersistence import Persistent
 from cPickleCache import PickleCache
+
+from cPersistence import simple_new
+import copy_reg
+copy_reg.constructor(simple_new)
+
+# Make an interface declaration for Persistent
+from zope.interface import classImplements
+from persistence.interfaces import IPersistent
+
+classImplements(Persistent, IPersistent)


=== Zope3/src/persistent/cPersistence.c 1.75 => 1.75.2.1 ===
--- Zope3/src/persistent/cPersistence.c:1.75	Thu Jan  8 11:53:15 2004
+++ Zope3/src/persistent/cPersistence.c	Fri Jan  9 17:23:24 2004
@@ -731,6 +731,24 @@
     if (PyModule_AddObject(m, "CAPI", s) < 0)
 	return;
 
+    if (PyModule_AddObject(m, 
+                           "GHOST", 
+                           PyInt_FromLong(cPersistent_GHOST_STATE)
+                           ) < 0)
+	return;
+
+    if (PyModule_AddObject(m, 
+                           "UPTODATE", 
+                           PyInt_FromLong(cPersistent_UPTODATE_STATE)
+                           ) < 0)
+	return;
+
+    if (PyModule_AddObject(m, 
+                           "CHANGED", 
+                           PyInt_FromLong(cPersistent_CHANGED_STATE)
+                           ) < 0)
+	return;
+
     py_simple_new = PyObject_GetAttrString(m, "simple_new");
     if (!py_simple_new)
         return;


=== Zope3/src/persistent/cPersistence.h 1.27 => 1.27.10.1 ===
--- Zope3/src/persistent/cPersistence.h:1.27	Fri Nov 28 11:44:55 2003
+++ Zope3/src/persistent/cPersistence.h	Fri Jan  9 17:23:24 2004
@@ -59,6 +59,8 @@
     percachedelfunc percachedel;
 } cPersistenceCAPIstruct;
 
+#define cPersistenceType cPersistenceCAPI->pertype
+
 #ifndef DONT_USE_CPERSISTENCECAPI
 static cPersistenceCAPIstruct *cPersistenceCAPI;
 #endif




More information about the Zodb-checkins mailing list