[pypy-svn] r19281 - pypy/release/0.8.x/pypy/translator/c/src

arigo at codespeak.net arigo at codespeak.net
Mon Oct 31 18:30:23 CET 2005


Author: arigo
Date: Mon Oct 31 18:30:22 2005
New Revision: 19281

Modified:
   pypy/release/0.8.x/pypy/translator/c/src/mem.h
Log:
Bug fix for 64-bit platforms.


Modified: pypy/release/0.8.x/pypy/translator/c/src/mem.h
==============================================================================
--- pypy/release/0.8.x/pypy/translator/c/src/mem.h	(original)
+++ pypy/release/0.8.x/pypy/translator/c/src/mem.h	Mon Oct 31 18:30:22 2005
@@ -9,7 +9,8 @@
 #define MAXIMUM_MALLOCABLE_SIZE   (LONG_MAX-4096)
 
 #define OP_MAX_VARSIZE(numitems, itemtype, err)  {			\
-    if (((unsigned)(numitems)) > (MAXIMUM_MALLOCABLE_SIZE / sizeof(itemtype)))\
+    if (((unsigned long)(numitems)) >					\
+		(MAXIMUM_MALLOCABLE_SIZE / sizeof(itemtype)))		\
         FAIL_EXCEPTION(err, PyExc_MemoryError, "addr space overflow");	\
   } 
 



More information about the Pypy-commit mailing list