[pypy-commit] pypy win32-cleanup2: dummy op for cpyext/api.py
mattip
noreply at buildbot.pypy.org
Mon Apr 23 00:58:23 CEST 2012
Author: Matti Picus <matti.picus at gmail.com>
Branch: win32-cleanup2
Changeset: r54635:f2e214d6b060
Date: 2012-04-22 23:46 +0300
http://bitbucket.org/pypy/pypy/changeset/f2e214d6b060/
Log: dummy op for cpyext/api.py
diff --git a/pypy/rlib/rposix.py b/pypy/rlib/rposix.py
--- a/pypy/rlib/rposix.py
+++ b/pypy/rlib/rposix.py
@@ -1,5 +1,5 @@
import os
-from pypy.rpython.lltypesystem.rffi import (CConstant, CExternVariable,
+from pypy.rpython.lltypesystem.rffi import (CConstant, CExternVariable,
INT, CCHARPP)
from pypy.rpython.lltypesystem import lltype, ll2ctypes, rffi
from pypy.translator.tool.cbuild import ExternalCompilationInfo
@@ -107,9 +107,12 @@
if not _validate_fd(fd):
raise OSError(get_errno(), 'Bad file descriptor')
else:
+ def _validate_fd(fd):
+ return 1
+
def validate_fd(fd):
return 1
-
+
def closerange(fd_low, fd_high):
# this behaves like os.closerange() from Python 2.6.
for fd in xrange(fd_low, fd_high):
More information about the pypy-commit
mailing list