public IRubyObject fromNative(ThreadContext context, IRubyObject obj) { if (!(obj instanceof Pointer)) { throw context.runtime.newTypeError("internal error: non-pointer"); } Pointer ptr = (Pointer) obj; if (ptr.getAddress() == 0) { return context.nil; } return new org.jruby.ext.ffi.jffi.Function(context.runtime, context.runtime.getModule("FFI").getClass("Function"), new CodeMemoryIO(context.runtime, ptr), functionInfo, null); }
@Override public Function newFunction(Ruby runtime, Pointer address, CallbackInfo cbInfo) { CodeMemoryIO mem = new CodeMemoryIO(runtime, address); RubyClass klass = runtime.getModule("FFI").getClass("Function"); return new Function(runtime, klass, mem, cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT, null, false); }
@Override public Function newFunction(Ruby runtime, Pointer address, CallbackInfo cbInfo) { CodeMemoryIO mem = new CodeMemoryIO(runtime, address); RubyClass klass = runtime.getModule("FFI").getClass("Function"); return new Function(runtime, klass, mem, cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT, null, false); }
@Override public Function newFunction(Ruby runtime, Pointer address, CallbackInfo cbInfo) { CodeMemoryIO mem = new CodeMemoryIO(runtime, address); RubyClass klass = runtime.getModule("FFI").getClass("Function"); return new Function(runtime, klass, mem, cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT, null, false); }
public IRubyObject fromNative(ThreadContext context, IRubyObject obj) { if (!(obj instanceof Pointer)) { throw context.runtime.newTypeError("internal error: non-pointer"); } Pointer ptr = (Pointer) obj; if (ptr.getAddress() == 0) { return context.nil; } return new org.jruby.ext.ffi.jffi.Function(context.runtime, context.runtime.getModule("FFI").getClass("Function"), new CodeMemoryIO(context.runtime, ptr), functionInfo, null); }
@Override public Function newFunction(Ruby runtime, Pointer address, CallbackInfo cbInfo) { CodeMemoryIO mem = new CodeMemoryIO(runtime, address); RubyClass klass = runtime.getModule("FFI").getClass("Function"); return new Function(runtime, klass, mem, cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT, null, false); }
public IRubyObject fromNative(ThreadContext context, IRubyObject obj) { if (!(obj instanceof Pointer)) { throw context.runtime.newTypeError("internal error: non-pointer"); } Pointer ptr = (Pointer) obj; if (ptr.getAddress() == 0) { return context.runtime.getNil(); } return new org.jruby.ext.ffi.jffi.Function(context.runtime, context.runtime.getModule("FFI").getClass("Function"), new CodeMemoryIO(context.runtime, ptr), functionInfo, null); }
public IRubyObject fromNative(ThreadContext context, IRubyObject obj) { if (!(obj instanceof Pointer)) { throw context.runtime.newTypeError("internal error: non-pointer"); } Pointer ptr = (Pointer) obj; if (ptr.getAddress() == 0) { return context.runtime.getNil(); } return new org.jruby.ext.ffi.jffi.Function(context.runtime, context.runtime.getModule("FFI").getClass("Function"), new CodeMemoryIO(context.runtime, ptr), functionInfo, null); }
returnType, parameterTypes, proc, callConvention); return new Function(context.runtime, (RubyClass) recv, fptr, returnType, parameterTypes, callConvention, enums, saveError);
returnType, parameterTypes, proc, callConvention); return new Function(context.runtime, (RubyClass) recv, fptr, returnType, parameterTypes, callConvention, enums, saveError);
returnType, parameterTypes, proc, callConvention); return new Function(context.runtime, (RubyClass) recv, fptr, returnType, parameterTypes, callConvention, enums, saveError);
returnType, parameterTypes, proc, callConvention); return new Function(context.runtime, (RubyClass) recv, fptr, returnType, parameterTypes, callConvention, enums, saveError);
? new Function(runtime, cbInfo.getMetaClass(), new CodeMemoryIO(runtime, address), cbInfo.getReturnType(), cbInfo.getParameterTypes(),
? new Function(runtime, cbInfo.getMetaClass(), new CodeMemoryIO(runtime, address), cbInfo.getReturnType(), cbInfo.getParameterTypes(),
? new Function(runtime, cbInfo.getMetaClass(), new CodeMemoryIO(runtime, address), cbInfo.getReturnType(), cbInfo.getParameterTypes(),
? new Function(runtime, cbInfo.getMetaClass(), new CodeMemoryIO(runtime, address), cbInfo.getReturnType(), cbInfo.getParameterTypes(),