[pypy-svn] r15179 - pypy/dist/pypy/lib

tismer at codespeak.net tismer at codespeak.net
Wed Jul 27 14:10:52 CEST 2005


Author: tismer
Date: Wed Jul 27 14:10:51 2005
New Revision: 15179

Modified:
   pypy/dist/pypy/lib/_marshal.py
Log:
fixed marshal to use _ for its internal classes

Modified: pypy/dist/pypy/lib/_marshal.py
==============================================================================
--- pypy/dist/pypy/lib/_marshal.py	(original)
+++ pypy/dist/pypy/lib/_marshal.py	Wed Jul 27 14:10:51 2005
@@ -34,7 +34,7 @@
 TYPE_SET      = '<'
 TYPE_FROZENSET= '>'
 
-class Marshaller:
+class _Marshaller:
 
     dispatch = {}
 
@@ -230,10 +230,10 @@
     except NameError:
         pass
 
-class NULL:
+class _NULL:
     pass
 
-class Unmarshaller:
+class _Unmarshaller:
 
     dispatch = {}
 
@@ -310,7 +310,7 @@
         return x
 
     def load_null(self):
-        return NULL
+        return _NULL
     dispatch[TYPE_NULL] = load_null
 
     def load_none(self):
@@ -410,7 +410,7 @@
         d = {}
         while 1:
             key = self.load()
-            if key is NULL:
+            if key is _NULL:
                 break
             value = self.load()
             d[key] = value
@@ -459,17 +459,17 @@
     frozenset = set
 
 def dump(x, f):
-    Marshaller(f.fileno()).dump(x)
+    _Marshaller(f.fileno()).dump(x)
 
 def load(f):
-    return Unmarshaller(f.fileno()).load()
+    return _Unmarshaller(f.fileno()).load()
 
 def dumps(x):
-    m = Marshaller(-1)
+    m = _Marshaller(-1)
     m.dump(x)
     return m.getvalue()
 
 def loads(s):
-    um = Unmarshaller(-1)
+    um = _Unmarshaller(-1)
     um.setvalue(s)
     return um.load()



More information about the Pypy-commit mailing list