Commits

wlav committed b83af8a

consisten use of void* and char*

Comments (0)

Files changed (1)

pypy/module/cppyy/converter.py

         cpp_instance = space.interp_w(W_CPPInstance, w_cpp_instance, can_be_None=True)
         if cpp_instance:
             return cpp_instance.rawobject
-    return lltype.nullptr(rffi.CCHARP.TO)
+    return lltype.nullptr(rffi.VOIDP.TO)
 
 
 class TypeConverter(object):
     def _get_raw_address(self, space, w_obj, offset):
         rawobject = get_rawobject(space, w_obj)
         if rawobject:
-            fieldptr = lltype.direct_ptradd(rawobject, offset)
+            field_address = lltype.direct_ptradd(rawobject, offset)
+            fieldptr = rffi.cast(rffi.CCHARP, field_address)
         else:
             fieldptr = rffi.cast(rffi.CCHARP, offset)
         return fieldptr