[Zodb-checkins] CVS: ZODB3/BTrees - check.py:1.1.2.4

Tim Peters tim.one at comcast.net
Thu Jun 12 17:37:21 EDT 2003


Update of /cvs-repository/ZODB3/BTrees
In directory cvs.zope.org:/tmp/cvs-serv26666/BTrees

Modified Files:
      Tag: ZODB3-3_1-branch
	check.py 
Log Message:
Purge True and False (for Python 2.1.3).


=== ZODB3/BTrees/check.py 1.1.2.3 => 1.1.2.4 ===
--- ZODB3/BTrees/check.py:1.1.2.3	Wed Jan 15 13:04:12 2003
+++ ZODB3/BTrees/check.py	Thu Jun 12 16:36:50 2003
@@ -209,8 +209,19 @@
         i += 1
     return keys, values
 
+from ZODB.utils import U64
+
 def type_and_adr(obj):
-    return "%s (0x%x)" % (type(obj).__name__, id(obj))
+    if obj._p_oid:
+        tag = 'oid'
+        hexit = U64(obj._p_oid)
+        serial = U64(obj._p_serial)
+        s = "%x %x" % (hexit, serial)
+    else:
+        tag = 'id'
+        hexit = id(obj)
+        s = "%x" % hexit
+    return "%s (%s %s)" % (type(obj).__name__, tag, s)
 
 # Walker implements a depth-first search of a BTree (or TreeSet or Set or
 # Bucket).  Subclasses must implement the visit_btree() and visit_bucket()




More information about the Zodb-checkins mailing list