[pypy-svn] r17976 - pypy/dist/pypy/interpreter/pyparser

ac at codespeak.net ac at codespeak.net
Thu Sep 29 14:54:41 CEST 2005


Author: ac
Date: Thu Sep 29 14:54:41 2005
New Revision: 17976

Modified:
   pypy/dist/pypy/interpreter/pyparser/pythonparse.py
Log:
Fix some naming issues.

Modified: pypy/dist/pypy/interpreter/pyparser/pythonparse.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/pythonparse.py	(original)
+++ pypy/dist/pypy/interpreter/pyparser/pythonparse.py	Thu Sep 29 14:54:41 2005
@@ -35,7 +35,7 @@
         else:
             enc = _normalize_encoding(_check_for_encoding(textsrc))
             if enc is not None and enc not in ('utf-8', 'iso-8859-1'):
-                textsrc = _recode_to_utf8(builder.space, textsrc, enc)
+                textsrc = recode_to_utf8(builder.space, textsrc, enc)
 
         lines = [line + '\n' for line in textsrc.split('\n')]
         builder.source_encoding = enc
@@ -57,13 +57,13 @@
             # return None
         return builder
     
-app_recode_to_utf8 = gateway.applevel(r'''
-    def app_recode_to_utf8(text, encoding):
+_recode_to_utf8 = gateway.applevel(r'''
+    def _recode_to_utf8(text, encoding):
         return unicode(text, encoding).encode("utf-8")
-''').interphook('app_recode_to_utf8')
+''').interphook('_recode_to_utf8')
 
-def _recode_to_utf8(space, text, encoding):
-    return space.str_w(app_recode_to_utf8(space, space.wrap(text),
+def recode_to_utf8(space, text, encoding):
+    return space.str_w(_recode_to_utf8(space, space.wrap(text),
                                           space.wrap(encoding)))
 def _normalize_encoding(encoding):
     """returns normalized name for <encoding>



More information about the Pypy-commit mailing list