[pypy-svn] r15724 - pypy/dist/pypy/rpython

pedronis at codespeak.net pedronis at codespeak.net
Sat Aug 6 14:06:13 CEST 2005


Author: pedronis
Date: Sat Aug  6 14:06:12 2005
New Revision: 15724

Modified:
   pypy/dist/pypy/rpython/extfunctable.py
Log:
os.write result is positive



Modified: pypy/dist/pypy/rpython/extfunctable.py
==============================================================================
--- pypy/dist/pypy/rpython/extfunctable.py	(original)
+++ pypy/dist/pypy/rpython/extfunctable.py	Sat Aug  6 14:06:12 2005
@@ -54,6 +54,10 @@
 def noneannotation(*args):
     return None
 
+def posannotation(*args):
+    from pypy.annotation.model import SomeInteger
+    return SomeInteger(nonneg=True)
+
 def statannotation(*args):
     from pypy.annotation.model import SomeInteger, SomeTuple
     return SomeTuple((SomeInteger(),)*10)
@@ -69,7 +73,7 @@
 # external function declarations
 declare(os.open     , int           , 'll_os/open')
 declare(os.read     , str           , 'll_os/read')
-declare(os.write    , int           , 'll_os/write')
+declare(os.write    , posannotation , 'll_os/write')
 declare(os.close    , noneannotation, 'll_os/close')
 declare(os.getcwd   , str           , 'll_os/getcwd')
 declare(os.dup      , int           , 'll_os/dup')



More information about the Pypy-commit mailing list