Commits

Amaury Forgeot d'Arc committed 7b463bc

Translation fixes. Now it fails in rtyping phase!

Comments (0)

Files changed (4)

pypy/module/_socket/interp_socket.py

                 elif cmd == _c.SIO_KEEPALIVE_VALS:
                     w_onoff, w_time, w_interval = space.unpackiterable(w_option)
                     option_ptr = rffi.cast(lltype.Ptr(_c.tcp_keepalive), value_ptr)
-                    option_ptr.c_onoff = space.uint_w(w_onoff)
-                    option_ptr.c_keepalivetime = space.uint_w(w_time)
-                    option_ptr.c_keepaliveinterval = space.uint_w(w_interval)
+                    rffi.setintfield(option_ptr, 'c_onoff',
+                                     space.uint_w(w_onoff))
+                    rffi.setintfield(option_ptr, 'c_keepalivetime',
+                                     space.uint_w(w_time))
+                    rffi.setintfield(option_ptr, 'c_keepaliveinterval',
+                                     space.uint_w(w_interval))
 
                 res = _c.WSAIoctl(
                     self.fd, cmd, value_ptr, value_size,

pypy/module/_winreg/interp_winreg.py

                 if ret == rwinreg.ERROR_MORE_DATA:
                     # Resize and retry
                     bufSize *= 2
-                    bufsize_p[0] = bufSize
+                    bufsize_p[0] = rffi.cast(rwin32.LONG, bufSize)
                     continue
 
                 if ret != 0:

pypy/rlib/rmmap.py

             FILE_BEGIN = 0
             high_ref = lltype.malloc(PLONG.TO, 1, flavor='raw')
             try:
-                high_ref[0] = newsize_high
+                high_ref[0] = rffi.cast(LONG, newsize_high)
                 SetFilePointer(self.file_handle, newsize_low, high_ref,
                                FILE_BEGIN)
             finally:

pypy/rpython/module/ll_os.py

 import py
 from pypy.rpython.module.support import ll_strcpy, OOSupport
 from pypy.tool.sourcetools import func_with_new_name, func_renamer
-from pypy.rlib.rarithmetic import r_longlong
+from pypy.rlib.rarithmetic import r_longlong, r_uint
 from pypy.rpython.extfunc import (
     BaseLazyRegistering, lazy_register, register_external)
 from pypy.rpython.extfunc import registering, registering_if, extdef
 
         @registering(rwin32.FormatError)
         def register_rwin32_FormatError(self):
-            return extdef([rwin32.DWORD], str,
+            return extdef([r_uint], str,
                           "rwin32_FormatError",
                           llimpl=rwin32.llimpl_FormatError,
                           ooimpl=rwin32.fake_FormatError)