public final IRubyObject invoke( ThreadContext context, Function function, HeapInvocationBuffer args) { final long address = invoker.invokeAddress(function, args); return RubyArray.newArray( context.getRuntime(), FFIUtil.getString(context.getRuntime(), address), new Pointer(context.getRuntime(), NativeMemoryIO.wrap(context.getRuntime(), address))); }
public final IRubyObject invoke( ThreadContext context, Function function, HeapInvocationBuffer args) { return FFIUtil.getString(context.getRuntime(), invoker.invokeAddress(function, args)); }
public final IRubyObject fromNative(ThreadContext context, int value) { long address = ((long) value) & PointerResultConverter.ADDRESS_MASK; return FFIUtil.getString(context.getRuntime(), address); }