[Zope3-checkins] CVS: Zope3/src/zodb - connection.py:1.7.4.8

Jeremy Hylton jeremy@zope.com
Thu, 13 Mar 2003 11:12:50 -0500


Update of /cvs-repository/Zope3/src/zodb
In directory cvs.zope.org:/tmp/cvs-serv8835

Modified Files:
      Tag: opaque-pickles-branch
	connection.py 
Log Message:
Change TmpStore pack format for nrefs to I from Q.


=== Zope3/src/zodb/connection.py 1.7.4.7 => 1.7.4.8 ===
--- Zope3/src/zodb/connection.py:1.7.4.7	Thu Mar 13 11:05:42 2003
+++ Zope3/src/zodb/connection.py	Thu Mar 13 11:12:50 2003
@@ -563,8 +563,8 @@
     # the header are the refs and the data, where the size of refs is
     # nrefs * 8.
     
-    _fmt = ">8s8sQQ"
-    _header_size = 32
+    _fmt = ">8s8sQI"
+    _header_size = 28
 
     def __init__(self, db, storage, base_version):
         self._db = db
@@ -601,7 +601,7 @@
         assert pos is not None
         self._file.seek(pos)
         buf = self._file.read(self._header_size)
-        oid, serial, nrefs, size = struct.unpack(">8s8sQQ", buf)
+        oid, serial, nrefs, size = struct.unpack(self._fmt, buf)
         refs = self._file.read(nrefs * 8)
         data = self._file.read(size)
         return data, splitrefs(refs), serial
@@ -615,7 +615,7 @@
         self._file.seek(self._pos)
         if serial is None:
             serial = ZERO
-        buf = struct.pack(">8s8sQQ", oid, serial, len(refs), len(data))
+        buf = struct.pack(self._fmt, oid, serial, len(refs), len(data))
         self._file.write(buf)
         self._file.write("".join(refs))
         self._file.write(data)