Exemple #1
0
 def _wrap_reference(self, space, rffiptr):
     if self.do_assign:
         capi.c_double2longdouble(space, space.float_w(self.w_item),
                                  rffiptr)
         self.do_assign = False
         return self.w_item
     return space.newfloat(capi.c_longdouble2double(space, rffiptr))
Exemple #2
0
 def convert_argument_libffi(self, space, w_obj, address, scratch):
     capi.c_double2longdouble(space, space.float_w(w_obj), rffi.cast(rffi.VOIDP, scratch))
     x = rffi.cast(rffi.VOIDPP, address)
     x[0] = scratch
Exemple #3
0
 def default_argument_libffi(self, space, address):
     if not self.valid_default:
         from pypy.module._cppyy.interp_cppyy import FastCallNotPossible
         raise FastCallNotPossible
     x = rffi.cast(rffi.VOIDP, address)
     capi.c_double2longdouble(space, self.default, x)
Exemple #4
0
 def to_memory(self, space, w_obj, w_value, offset):
     address = self._get_raw_address(space, w_obj, offset)
     rffiptr = rffi.cast(rffi.VOIDP, address)
     capi.c_double2longdouble(space, space.float_w(w_value), rffiptr)
Exemple #5
0
 def convert_argument(self, space, w_obj, address):
     x = rffi.cast(rffi.VOIDP, address)
     capi.c_double2longdouble(space, space.float_w(w_obj), x)
     ba = rffi.cast(rffi.CCHARP, address)
     ba[capi.c_function_arg_typeoffset(space)] = self.typecode