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

tismer at codespeak.net tismer at codespeak.net
Sat Aug 6 12:48:26 CEST 2005


Author: tismer
Date: Sat Aug  6 12:48:25 2005
New Revision: 15718

Modified:
   pypy/dist/pypy/lib/_osfilewrapper.py
Log:
enabling marshal:

_osfilewrapper had problems with os.write. I had to add
an assertion that this is alsway non-negative. Maybe
we want to add this info directly to os.write.

Modified: pypy/dist/pypy/lib/_osfilewrapper.py
==============================================================================
--- pypy/dist/pypy/lib/_osfilewrapper.py	(original)
+++ pypy/dist/pypy/lib/_osfilewrapper.py	Sat Aug  6 12:48:25 2005
@@ -25,6 +25,8 @@
         towrite = len(buf)
         while writecount < towrite:
             # os.write will raise an error itself
+            assert writecount >= 0 # annotator hint, don't remove.
+            # XXX should be tellable in extfunctable
             writecount += os.write(self.fd, buf[writecount:])
 
     def close(self):



More information about the Pypy-commit mailing list