[pypy-svn] r44339 - pypy/dist/pypy/rpython/module
afa at codespeak.net
afa at codespeak.net
Mon Jun 18 13:45:14 CEST 2007
Author: afa
Date: Mon Jun 18 13:45:14 2007
New Revision: 44339
Modified:
pypy/dist/pypy/rpython/module/ll_os.py
Log:
os.WIFSIGNALED does not exists on win32.
Most tests now pass again.
Modified: pypy/dist/pypy/rpython/module/ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os.py (original)
+++ pypy/dist/pypy/rpython/module/ll_os.py Mon Jun 18 13:45:14 2007
@@ -135,17 +135,19 @@
register_external(os.open, [str, int, int], int, "ll_os.ll_os_open",
llimpl=os_open_lltypeimpl, oofakeimpl=os_open_oofakeimpl)
-def fake_WIFSIGNALED(status):
- return int(os.WIFSIGNALED(status))
+if hasattr(os, 'WIFSIGNALED'):
+ def fake_WIFSIGNALED(status):
+ return int(os.WIFSIGNALED(status))
+
+ os_WIFSIGNALED = rffi.llexternal('WIFSIGNALED', [lltype.Signed],
+ lltype.Signed,
+ _callable=fake_WIFSIGNALED)
-os_WIFSIGNALED = rffi.llexternal('WIFSIGNALED', [lltype.Signed], lltype.Signed,
- _callable=fake_WIFSIGNALED)
+ def WIFSIGNALED_lltypeimpl(status):
+ return bool(os_WIFSIGNALED(status))
-def WIFSIGNALED_lltypeimpl(status):
- return bool(os_WIFSIGNALED(status))
-
-register_external(os.WIFSIGNALED, [int], bool, "ll_os.WIFSIGNALED",
- llimpl=WIFSIGNALED_lltypeimpl)
+ register_external(os.WIFSIGNALED, [int], bool, "ll_os.WIFSIGNALED",
+ llimpl=WIFSIGNALED_lltypeimpl)
class BaseOS:
__metaclass__ = ClassMethods
More information about the Pypy-commit
mailing list