[pypy-svn] r13511 - pypy/branch/pypy-translation-snapshot/module/sys

pedronis at codespeak.net pedronis at codespeak.net
Fri Jun 17 02:34:28 CEST 2005


Author: pedronis
Date: Fri Jun 17 02:34:27 2005
New Revision: 13511

Modified:
   pypy/branch/pypy-translation-snapshot/module/sys/state.py
Log:
merge pypy_getudir additional indirection



Modified: pypy/branch/pypy-translation-snapshot/module/sys/state.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/module/sys/state.py	(original)
+++ pypy/branch/pypy-translation-snapshot/module/sys/state.py	Fri Jun 17 02:34:27 2005
@@ -76,11 +76,17 @@
 def get(space): 
     return space.fromcache(State)
 
-def pypy_getudir(space):
+def _pypy_getudir(space):
     """NOT_RPYTHON"""
     from pypy.tool.udir import udir
     return space.wrap(str(udir))
-pypy_getudir._annspecialcase_ = "override:ignore"
+_pypy_getudir._annspecialcase_ = "override:ignore"
+
+# we need the inderaction because this function will live in a dictionary with other 
+# RPYTHON functions and share call sites with them. Better it not be a special-case
+# directly. 
+def pypy_getudir(space):
+    return _pypy_getudir(space)
 
 def getdefaultencoding(space): 
     return space.wrap(sys.getdefaultencoding())



More information about the Pypy-commit mailing list