[pypy-commit] pypy stmgc-c7: Re-export these names from pypystm

arigo noreply at buildbot.pypy.org
Mon Mar 16 10:03:13 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r76392:e3dad9a57eca
Date: 2015-03-16 09:20 +0100
http://bitbucket.org/pypy/pypy/changeset/e3dad9a57eca/

Log:	Re-export these names from pypystm

diff --git a/lib_pypy/transaction.py b/lib_pypy/transaction.py
--- a/lib_pypy/transaction.py
+++ b/lib_pypy/transaction.py
@@ -37,24 +37,20 @@
     signals_enabled = _SignalsEnabled()
 
 try:
-    from pypystm import hint_commit_soon
+    from pypystm import hint_commit_soon, getsegmentlimit
+    from pypystm import hashtable, stmset, stmdict
+    from pypystm import local, time, clock
 except ImportError:
     # Not a STM-enabled PyPy.
     def hint_commit_soon():
         return None
-
-try:
-    from pypystm import getsegmentlimit
-except ImportError:
-    # Not a STM-enabled PyPy.
     def getsegmentlimit():
         return 1
-
-try:
-    from pypystm import hashtable
-except ImportError:
-    # Not a STM-enabled PyPy.
     hashtable = dict
+    stmset = set
+    stmdict = dict
+    local = thread._local
+    from time import time, clock
 
 class stmidset(object):
     def __init__(self):


More information about the pypy-commit mailing list