Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r44619:2b5a9ceaa1b2 Date: 2011-06-01 11:08 +0000 http://bitbucket.org/pypy/pypy/changeset/2b5a9ceaa1b2/
Log: merge heads diff --git a/pypy/annotation/model.py b/pypy/annotation/model.py --- a/pypy/annotation/model.py +++ b/pypy/annotation/model.py @@ -32,13 +32,15 @@ import pypy from pypy.tool import descriptor from pypy.tool.pairtype import pair, extendabletype -from pypy.tool.tls import tlsobject from pypy.rlib.rarithmetic import r_uint, r_ulonglong, base_int from pypy.rlib.rarithmetic import r_singlefloat, r_longfloat import inspect, weakref DEBUG = False # set to False to disable recording of debugging information -TLS = tlsobject() + +class State(object): + pass +TLS = State() class SomeObject(object): """The set of all objects. Each instance stands diff --git a/pypy/rpython/lltypesystem/ll2ctypes.py b/pypy/rpython/lltypesystem/ll2ctypes.py --- a/pypy/rpython/lltypesystem/ll2ctypes.py +++ b/pypy/rpython/lltypesystem/ll2ctypes.py @@ -20,7 +20,6 @@ from pypy.rpython.extfunc import ExtRegistryEntry from pypy.rlib.objectmodel import Symbolic, ComputedIntSymbolic from pypy.tool.uid import fixid -from pypy.tool.tls import tlsobject from pypy.rlib.rarithmetic import r_uint, r_singlefloat, r_longfloat, intmask from pypy.annotation import model as annmodel from pypy.rpython.llinterp import LLInterpreter, LLException @@ -28,6 +27,7 @@ from pypy.rpython import raddress from pypy.translator.platform import platform from array import array +from thread import _local as tlsobject # ____________________________________________________________ diff --git a/pypy/rpython/lltypesystem/lltype.py b/pypy/rpython/lltypesystem/lltype.py --- a/pypy/rpython/lltypesystem/lltype.py +++ b/pypy/rpython/lltypesystem/lltype.py @@ -4,14 +4,16 @@ base_int, normalizedinttype) from pypy.rlib.objectmodel import Symbolic from pypy.tool.uid import Hashable -from pypy.tool.tls import tlsobject from pypy.tool.identity_dict import identity_dict from pypy.tool import leakfinder from types import NoneType from sys import maxint import weakref -TLS = tlsobject() +class State(object): + pass + +TLS = State() class WeakValueDictionary(weakref.WeakValueDictionary): """A subclass of weakref.WeakValueDictionary diff --git a/pypy/tool/tls.py b/pypy/tool/tls.py deleted file mode 100644 --- a/pypy/tool/tls.py +++ /dev/null @@ -1,8 +0,0 @@ - -"""Thread-local storage.""" - -try: - from thread import _local as tlsobject -except ImportError: - class tlsobject(object): - pass _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit