Commits

Armin Rigo  committed c5e09fc

Translation fixes.

  • Participants
  • Parent commits 9ba7bb9
  • Branches stm-gc

Comments (0)

Files changed (3)

File pypy/rpython/lltypesystem/rffi.py

             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):

File pypy/rpython/memory/gc/stmgc.py

     # ----------
 
     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)

File pypy/translator/stm/test/targetdemo.py

                 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)