예제 #1
0
파일: executor.py 프로젝트: yuanleilei/pypy
 def execute(self, space, cppmethod, cppthis, num_args, args):
     from pypy.module._cppyy import interp_cppyy
     long_result = capi.c_call_o(space, cppmethod, cppthis, num_args, args,
                                 self.cppclass)
     ptr_result = rffi.cast(capi.C_OBJECT, long_result)
     return interp_cppyy.wrap_cppobject(space,
                                        ptr_result,
                                        self.cppclass,
                                        do_cast=False,
                                        python_owns=True,
                                        fresh=True)
예제 #2
0
파일: executor.py 프로젝트: zcxowwww/pypy
 def execute(self, space, cppmethod, cppthis, num_args, args):
     oresult = capi.c_call_o(space, cppmethod, cppthis, num_args, args,
                             self.clsdecl)
     return self._wrap_result(space, rffi.cast(capi.C_OBJECT, oresult))
예제 #3
0
파일: executor.py 프로젝트: lvyitian/pypy
 def execute(self, space, cppmethod, cppthis, num_args, args):
     cmplx = capi.c_call_o(space, cppmethod, cppthis, num_args, args,
                           self.clsdecl)
     pycmplx = self._convert2complex(space, rffi.cast(capi.C_OBJECT, cmplx))
     capi.c_destruct(space, self.clsdecl, cmplx)
     return pycmplx