[pypy-commit] pypy disable_merge_different_int_types: (arigo, bivab): make sure makeipv4addr is called with an unsigned

bivab noreply at buildbot.pypy.org
Mon Nov 28 15:55:53 CET 2011


Author: David Schneider <david.schneider at picle.org>
Branch: disable_merge_different_int_types
Changeset: r49912:9d67bd8ccb4a
Date: 2011-11-28 15:47 +0100
http://bitbucket.org/pypy/pypy/changeset/9d67bd8ccb4a/

Log:	(arigo, bivab): make sure makeipv4addr is called with an unsigned

diff --git a/pypy/rlib/rsocket.py b/pypy/rlib/rsocket.py
--- a/pypy/rlib/rsocket.py
+++ b/pypy/rlib/rsocket.py
@@ -17,7 +17,7 @@
 
 from pypy.rlib.objectmodel import instantiate, keepalive_until_here
 from pypy.rlib import _rsocket_rffi as _c
-from pypy.rlib.rarithmetic import intmask
+from pypy.rlib.rarithmetic import intmask, r_uint
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.rpython.lltypesystem.rffi import sizeof, offsetof
 
@@ -168,7 +168,7 @@
 
     # IPv4 also supports the special name "<broadcast>".
     if name == '<broadcast>':
-        return makeipv4addr(intmask(INADDR_BROADCAST), result)
+        return makeipv4addr(r_uint(INADDR_BROADCAST), result)
 
     # "dd.dd.dd.dd" format.
     digits = name.split('.')


More information about the pypy-commit mailing list