Commits

Tobias Oberstein committed 5c06272

Correct use of integer types.

Comments (0)

Files changed (2)

pypy/module/select/interp_kqueue.py

 
 
 CConfig.kevent = rffi_platform.Struct("struct kevent", [
-    ("ident", rffi.SIZE_T), # uintptr_t
+    ("ident", rffi.UINTPTR_T),
     ("filter", rffi.SHORT),
     ("flags", rffi.USHORT),
     ("fflags", rffi.UINT),
-    ("data", rffi.SSIZE_T), # intptr_t
+    ("data", rffi.INTPTR_T),
     ("udata", rffi.VOIDP),
 ])
 
         if self.event:
             lltype.free(self.event, flavor="raw")
 
-    @unwrap_spec(filter=int, flags=int, fflags=rffi.r_uint, data=int, udata=rffi.r_uint)
+    @unwrap_spec(filter=int, flags=rffi.r_uint, fflags=rffi.r_uint, data=int, udata=rffi.r_uint)
     def descr__init__(self, space, w_ident, filter=KQ_FILTER_READ, flags=KQ_EV_ADD, fflags=0, data=0, udata=0):
         ident = space.c_filedescriptor_w(w_ident)
 

pypy/rpython/lltypesystem/rffi.py

         TYPES.append(name)
 TYPES += ['signed char', 'unsigned char',
           'long long', 'unsigned long long',
-          'size_t', 'time_t', 'wchar_t']
+          'size_t', 'time_t', 'wchar_t',
+          'uintptr_t', 'intptr_t']
 if os.name != 'nt':
     TYPES.append('mode_t')
     TYPES.append('pid_t')
 # (use SIGNEDCHAR or UCHAR for the small integer types)
 CHAR = lltype.Char
 
-INTPTR_T = SSIZE_T
-
 # double
 DOUBLE = lltype.Float
 LONGDOUBLE = lltype.LongFloat