[pypy-svn] r16091 - pypy/dist/pypy/module/marshal

tismer at codespeak.net tismer at codespeak.net
Tue Aug 16 00:06:49 CEST 2005


Author: tismer
Date: Tue Aug 16 00:06:48 2005
New Revision: 16091

Modified:
   pypy/dist/pypy/module/marshal/interp_marshal.py
Log:
explicitly casted get1() to char.
Otherwise, even the derived class uses a string!


Modified: pypy/dist/pypy/module/marshal/interp_marshal.py
==============================================================================
--- pypy/dist/pypy/module/marshal/interp_marshal.py	(original)
+++ pypy/dist/pypy/module/marshal/interp_marshal.py	Tue Aug 16 00:06:48 2005
@@ -387,7 +387,8 @@
         return self.reader.read(n)
 
     def get1(self):
-        return self.get(1)
+        # convince typer to use a char
+        return chr(ord(self.get(1)))
 
     def atom_str(self, typecode):
         self.start(typecode)
@@ -408,7 +409,6 @@
         tc = self.get1()
         if tc != typecode:
             self.raise_exc('invalid marshal data')
-        self.typecode = tc
 
     def get_short(self):
         s = self.get(2)



More information about the Pypy-commit mailing list