[pypy-svn] pypy default: Allow negative integers in some of these functions.

arigo commits-noreply at bitbucket.org
Fri Jan 21 17:37:09 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r41160:99f702a04e1f
Date: 2011-01-21 17:36 +0100
http://bitbucket.org/pypy/pypy/changeset/99f702a04e1f/

Log:	Allow negative integers in some of these functions.
	-1 is documented as meaning "no change".

diff --git a/pypy/module/posix/interp_posix.py b/pypy/module/posix/interp_posix.py
--- a/pypy/module/posix/interp_posix.py
+++ b/pypy/module/posix/interp_posix.py
@@ -985,7 +985,7 @@
     except OSError, e:
         raise wrap_oserror(space, e)
     return space.w_None                
-setreuid.unwrap_spec = [ObjSpace, "c_nonnegint", "c_nonnegint"]
+setreuid.unwrap_spec = [ObjSpace, "c_int", "c_int"]
 
 def setregid(space, rgid, egid):
     """ setregid(rgid, egid)
@@ -996,8 +996,8 @@
         os.setregid(rgid, egid)
     except OSError, e:
         raise wrap_oserror(space, e)
-    return space.w_None                
-setregid.unwrap_spec = [ObjSpace, "c_nonnegint", "c_nonnegint"]
+    return space.w_None
+setregid.unwrap_spec = [ObjSpace, "c_int", "c_int"]
 
 def getsid(space, pid):
     """ getsid(pid) -> sid
@@ -1078,7 +1078,7 @@
     except OSError, e:
         raise wrap_oserror(space, e, path)
     return space.w_None
-chown.unwrap_spec = [ObjSpace, str, "c_nonnegint", "c_nonnegint"]
+chown.unwrap_spec = [ObjSpace, str, "c_int", "c_int"]
 
 def lchown(space, path, uid, gid):
     try:
@@ -1086,7 +1086,7 @@
     except OSError, e:
         raise wrap_oserror(space, e, path)
     return space.w_None
-lchown.unwrap_spec = [ObjSpace, str, "c_nonnegint", "c_nonnegint"]
+lchown.unwrap_spec = [ObjSpace, str, "c_int", "c_int"]
 
 def getloadavg(space):
     try:


More information about the Pypy-commit mailing list