[pypy-commit] pypy stm: Fixes.

arigo noreply at buildbot.pypy.org
Fri Oct 28 10:43:40 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: stm
Changeset: r48552:c00c946fb09b
Date: 2011-10-28 03:02 +0200
http://bitbucket.org/pypy/pypy/changeset/c00c946fb09b/

Log:	Fixes.

diff --git a/pypy/translator/c/src/commondefs.h b/pypy/translator/c/src/commondefs.h
--- a/pypy/translator/c/src/commondefs.h
+++ b/pypy/translator/c/src/commondefs.h
@@ -36,6 +36,10 @@
 #  error "unsupported value for LLONG_MIN"
 #endif
 
+#ifndef PYPY_LONG_BIT
+#  error "PYPY_LONG_BIT must be defined before this file can be imported"
+#endif
+
 
 /******************** 32-bit support ********************/
 #if PYPY_LONG_BIT == 32
diff --git a/pypy/translator/stm/_rffi_stm.py b/pypy/translator/stm/_rffi_stm.py
--- a/pypy/translator/stm/_rffi_stm.py
+++ b/pypy/translator/stm/_rffi_stm.py
@@ -7,9 +7,10 @@
 
 
 cdir = py.path.local(pypydir) / 'translator' / 'stm'
+cdir2 = py.path.local(pypydir) / 'translator' / 'c'
 
 eci = ExternalCompilationInfo(
-    include_dirs = [cdir],
+    include_dirs = [cdir, cdir2],
     includes = ['src_stm/et.h'],
     pre_include_bits = ['#define PYPY_LONG_BIT %d' % LONG_BIT],
     separate_module_sources = ['#include "src_stm/et.c"\n'],
@@ -19,7 +20,7 @@
     return rffi.llexternal(name, args, result, compilation_info=eci,
                            _nowrapper=True, **kwds)
 
-SignedP = lltype.Ptr(lltype.Array(lltype.Signed, hints={'nolength': True}))
+SignedP = rffi.CArrayPtr(lltype.Signed)
 
 
 descriptor_init = llexternal('stm_descriptor_init', [], lltype.Void)


More information about the pypy-commit mailing list