def execute(self, space, cppmethod, cppthis, num_args, args): cstr_result = capi.c_call_s(space, cppmethod, cppthis, num_args, args) return space.wrap(capi.charp2str_free(space, cstr_result))
def execute(self, space, cppmethod, cppthis, num_args, args): cstr, cstr_len = capi.c_call_s(space, cppmethod, cppthis, num_args, args) pystr = rffi.charpsize2str(cstr, cstr_len) capi.c_free(space, rffi.cast(rffi.VOIDP, cstr)) return space.wrap(pystr)
def execute(self, space, cppmethod, cppthis, num_args, args): cstr, cstr_len = capi.c_call_s(space, cppmethod, cppthis, num_args, args) pystr = rffi.charpsize2str(cstr, cstr_len) capi.c_free(space, rffi.cast(rffi.VOIDP, cstr)) return space.newbytes(pystr)