[pypy-svn] r14953 - in pypy/dist/pypy: interpreter objspace/std
pedronis at codespeak.net
pedronis at codespeak.net
Sat Jul 23 02:27:30 CEST 2005
Author: pedronis
Date: Sat Jul 23 02:27:29 2005
New Revision: 14953
Modified:
pypy/dist/pypy/interpreter/typedef.py
pypy/dist/pypy/objspace/std/typeobject.py
Log:
have a fakedcpytype by default, avoid hasattr and the warnings in the rtyper.
Modified: pypy/dist/pypy/interpreter/typedef.py
==============================================================================
--- pypy/dist/pypy/interpreter/typedef.py (original)
+++ pypy/dist/pypy/interpreter/typedef.py Sat Jul 23 02:27:29 2005
@@ -19,6 +19,8 @@
self.hasdict |= __base.hasdict
self.rawdict = rawdict
self.acceptable_as_base_class = True
+ # xxx used by faking
+ self.fakedcpytype = None
def _freeze_(self):
# hint for the annotator: track individual constant instances of TypeDef
Modified: pypy/dist/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/typeobject.py (original)
+++ pypy/dist/pypy/objspace/std/typeobject.py Sat Jul 23 02:27:29 2005
@@ -258,7 +258,7 @@
return W_DictProxyObject(space, space.newdict(dictspec))
def unwrap(w_self):
- if hasattr(w_self.instancetypedef, 'fakedcpytype'):
+ if w_self.instancetypedef.fakedcpytype is not None:
return w_self.instancetypedef.fakedcpytype
from pypy.objspace.std.model import UnwrapError
raise UnwrapError(w_self)
More information about the Pypy-commit
mailing list