[pypy-commit] pypy stm-gc: Translation fixes.

arigo noreply at buildbot.pypy.org
Sat Feb 11 17:15:53 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r52375:c5e09fcf82da
Date: 2012-02-11 16:12 +0000
http://bitbucket.org/pypy/pypy/changeset/c5e09fcf82da/

Log:	Translation fixes.

diff --git a/pypy/rpython/lltypesystem/rffi.py b/pypy/rpython/lltypesystem/rffi.py
--- a/pypy/rpython/lltypesystem/rffi.py
+++ b/pypy/rpython/lltypesystem/rffi.py
@@ -813,6 +813,7 @@
             b.append(cp[i])
             i += 1
         return assert_str0(b.build())
+    charp2strn._annenforceargs_ = [None, int]
 
     # char* and size -> str (which can contain null bytes)
     def charpsize2str(cp, size):
diff --git a/pypy/rpython/memory/gc/stmgc.py b/pypy/rpython/memory/gc/stmgc.py
--- a/pypy/rpython/memory/gc/stmgc.py
+++ b/pypy/rpython/memory/gc/stmgc.py
@@ -356,7 +356,7 @@
     # ----------
 
     def acquire(self, lock):
-        ll_thread.acquire_NOAUTO(lock, 1)
+        ll_thread.acquire_NOAUTO(lock, True)
 
     def release(self, lock):
         ll_thread.release_NOAUTO(lock)
diff --git a/pypy/translator/stm/test/targetdemo.py b/pypy/translator/stm/test/targetdemo.py
--- a/pypy/translator/stm/test/targetdemo.py
+++ b/pypy/translator/stm/test/targetdemo.py
@@ -93,11 +93,11 @@
                 glob.USE_MEMORY = bool(int(argv[3]))
     glob.done = 0
     glob.lock = ll_thread.allocate_ll_lock()
-    ll_thread.acquire_NOAUTO(glob.lock, 1)
+    ll_thread.acquire_NOAUTO(glob.lock, True)
     for i in range(glob.NUM_THREADS):
         glob._arg = Arg()
         ll_thread.start_new_thread(run_me, ())
-        ll_thread.acquire_NOAUTO(glob.lock, 1)
+        ll_thread.acquire_NOAUTO(glob.lock, True)
     print "sleeping..."
     while glob.done < glob.NUM_THREADS:    # poor man's lock
         time.sleep(1)


More information about the pypy-commit mailing list