[pypy-commit] pypy stdlib-2.7.6: now, fix pwd translation on 64bit?
bdkearns
noreply at buildbot.pypy.org
Mon Mar 3 04:33:18 CET 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: stdlib-2.7.6
Changeset: r69630:510ebdd4604e
Date: 2014-03-02 22:32 -0500
http://bitbucket.org/pypy/pypy/changeset/510ebdd4604e/
Log: now, fix pwd translation on 64bit?
diff --git a/pypy/module/pwd/interp_pwd.py b/pypy/module/pwd/interp_pwd.py
--- a/pypy/module/pwd/interp_pwd.py
+++ b/pypy/module/pwd/interp_pwd.py
@@ -3,6 +3,7 @@
from rpython.rtyper.lltypesystem import rffi, lltype
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import unwrap_spec
+from rpython.rlib.rarithmetic import widen
eci = ExternalCompilationInfo(includes=['pwd.h'])
@@ -69,7 +70,7 @@
msg = "getpwuid(): uid not found"
try:
val = space.int_w(w_uid)
- uid = rffi.cast(uid_t, val)
+ uid = widen(rffi.cast(uid_t, val))
if val == -1:
pass
elif val < 0 or uid != val:
More information about the pypy-commit
mailing list