[pypy-commit] pypy default: Document this function's purpose

arigo noreply at buildbot.pypy.org
Sat Oct 6 12:44:54 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r57801:a455c5066d0e
Date: 2012-10-06 11:45 +0200
http://bitbucket.org/pypy/pypy/changeset/a455c5066d0e/

Log:	Document this function's purpose

diff --git a/pypy/module/_cffi_backend/misc.py b/pypy/module/_cffi_backend/misc.py
--- a/pypy/module/_cffi_backend/misc.py
+++ b/pypy/module/_cffi_backend/misc.py
@@ -47,9 +47,10 @@
     raise NotImplementedError("bad integer size")
 
 def read_raw_ulong_data(target, size):
+    # only for types smaller than Unsigned
     for TP, TPP in _prim_unsigned_types:
         if size == rffi.sizeof(TP):
-            assert rffi.sizeof(TP) < rffi.sizeof(lltype.Signed)
+            assert rffi.sizeof(TP) < rffi.sizeof(lltype.Unsigned)
             return rffi.cast(lltype.Signed, rffi.cast(TPP,target)[0])
     raise NotImplementedError("bad integer size")
 


More information about the pypy-commit mailing list