[pypy-svn] r50270 - pypy/dist/pypy/rlib
fijal at codespeak.net
fijal at codespeak.net
Wed Jan 2 22:00:58 CET 2008
Author: fijal
Date: Wed Jan 2 22:00:57 2008
New Revision: 50270
Modified:
pypy/dist/pypy/rlib/rposix.py
Log:
Oops, perform intmask on errno. Always.
Modified: pypy/dist/pypy/rlib/rposix.py
==============================================================================
--- pypy/dist/pypy/rlib/rposix.py (original)
+++ pypy/dist/pypy/rlib/rposix.py Wed Jan 2 22:00:57 2008
@@ -1,6 +1,7 @@
from pypy.rpython.lltypesystem.rffi import CConstant, CExternVariable
from pypy.rpython.lltypesystem import lltype, ll2ctypes
from pypy.translator.tool.cbuild import ExternalCompilationInfo
+from pypy.rlib.rarithmetic import intmask
class CConstantErrno(CConstant):
# these accessors are used when calling get_errno() or set_errno()
@@ -20,6 +21,8 @@
includes=['errno.h']
)
-get_errno, set_errno = CExternVariable(lltype.Signed, 'errno', errno_eci,
- CConstantErrno, sandboxsafe=True)
+_get_errno, set_errno = CExternVariable(lltype.Signed, 'errno', errno_eci,
+ CConstantErrno, sandboxsafe=True)
+def get_errno():
+ return intmask(_get_errno())
More information about the Pypy-commit
mailing list