Rev 117: Some quick fixes to handle refs that are bigger than the current bit width. in http://bazaar.launchpad.net/~meliae-dev/meliae/trunk

John Arbash Meinel john at arbash-meinel.com
Wed Dec 23 16:55:25 GMT 2009


At http://bazaar.launchpad.net/~meliae-dev/meliae/trunk

------------------------------------------------------------
revno: 117
revision-id: john at arbash-meinel.com-20091223165505-vj8z50nodcw8cnd4
parent: john at arbash-meinel.com-20091223151916-xltb5xx8wakmqf7b
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Wed 2009-12-23 10:55:05 -0600
message:
  Some quick fixes to handle refs that are bigger than the current bit width.
-------------- next part --------------
=== modified file 'meliae/_loader.pyx'
--- a/meliae/_loader.pyx	2009-10-23 03:47:24 +0000
+++ b/meliae/_loader.pyx	2009-12-23 16:55:05 +0000
@@ -59,7 +59,7 @@
     return refs
 
 
-cdef long *_list_to_ref_list(object refs):
+cdef long *_list_to_ref_list(object refs) except? NULL:
     cdef long i, num_refs, *ref_list
     cdef unsigned long temp
 

=== modified file 'meliae/loader.py'
--- a/meliae/loader.py	2009-12-02 15:01:24 +0000
+++ b/meliae/loader.py	2009-12-23 16:55:05 +0000
@@ -230,7 +230,7 @@
                 t = type(refs)
                 if refs is None:
                     refs = address
-                elif t is int:
+                elif t in (int, long):
                     refs = (refs, address)
                 elif t is tuple:
                     if len(refs) >= 10:
@@ -253,7 +253,7 @@
             else:
                 if refs is None:
                     obj.referrers = ()
-                elif type(refs) is int:
+                elif type(refs) in (int, long):
                     obj.referrers = (refs,)
                 else:
                     obj.referrers = refs



More information about the bazaar-commits mailing list