Example #1
0
 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)));
 }
Example #2
0
 public final IRubyObject invoke(
     ThreadContext context, Function function, HeapInvocationBuffer args) {
   return FFIUtil.getString(context.getRuntime(), invoker.invokeAddress(function, args));
 }
Example #3
0
 public final IRubyObject fromNative(ThreadContext context, int value) {
   long address = ((long) value) & PointerResultConverter.ADDRESS_MASK;
   return FFIUtil.getString(context.getRuntime(), address);
 }