private final NativeFunctionInfo newFunctionInfo(Ruby runtime, CallbackInfo cbInfo) { org.jruby.ext.ffi.Type[] paramTypes = cbInfo.getParameterTypes(); for (int i = 0; i < paramTypes.length; ++i) { if (!isParameterTypeValid(paramTypes[i]) || FFIUtil.getFFIType(paramTypes[i]) == null) { throw runtime.newTypeError("invalid callback parameter type: " + paramTypes[i]); } } if (!isReturnTypeValid(cbInfo.getReturnType()) || FFIUtil.getFFIType(cbInfo.getReturnType()) == null) { runtime.newTypeError("invalid callback return type: " + cbInfo.getReturnType()); } return new NativeFunctionInfo(runtime, cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT); }
public CallbackDataConverter(CallbackInfo cbInfo) { this.callbackFactory = CallbackManager.getInstance().getCallbackFactory(cbInfo.getRuntime(), cbInfo); this.functionInfo = new NativeFunctionInfo(cbInfo.getRuntime(), cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT); }
? new Function(runtime, cbInfo.getMetaClass(), new CodeMemoryIO(runtime, address), cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT, runtime.getNil(), false)
NativeCallbackPointer(Ruby runtime, RubyClass klass, Closure.Handle handle, CallbackInfo cbInfo, NativeFunctionInfo closureInfo) { super(runtime, klass, cbInfo.getParameterTypes().length, new CallbackMemoryIO(runtime, handle)); this.cbInfo = cbInfo; this.closureInfo = closureInfo; }
return new CallbackInfo(context.runtime, (RubyClass) klass, (Type) returnType, nativeParamTypes, stdcall); } catch (UnsatisfiedLinkError ex) {
CallbackInfo.createCallbackInfoClass(runtime, ffi);
? new Function(runtime, cbInfo.getMetaClass(), new CodeMemoryIO(runtime, address), cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT, runtime.getNil(), false)
NativeCallbackPointer(Ruby runtime, RubyClass klass, Closure.Handle handle, CallbackInfo cbInfo, NativeFunctionInfo closureInfo) { super(runtime, klass, cbInfo.getParameterTypes().length, new CallbackMemoryIO(runtime, handle)); this.cbInfo = cbInfo; this.closureInfo = closureInfo; }
return new CallbackInfo(context.runtime, (RubyClass) klass, (Type) returnType, nativeParamTypes, stdcall); } catch (UnsatisfiedLinkError ex) {
CallbackInfo.createCallbackInfoClass(runtime, ffi);
private final NativeFunctionInfo newFunctionInfo(Ruby runtime, CallbackInfo cbInfo) { org.jruby.ext.ffi.Type[] paramTypes = cbInfo.getParameterTypes(); for (int i = 0; i < paramTypes.length; ++i) { if (!isParameterTypeValid(paramTypes[i]) || FFIUtil.getFFIType(paramTypes[i]) == null) { throw runtime.newTypeError("invalid callback parameter type: " + paramTypes[i]); } } if (!isReturnTypeValid(cbInfo.getReturnType()) || FFIUtil.getFFIType(cbInfo.getReturnType()) == null) { throw runtime.newTypeError("invalid callback return type: " + cbInfo.getReturnType()); } return new NativeFunctionInfo(runtime, cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT); }
public CallbackDataConverter(CallbackInfo cbInfo) { this.callbackFactory = CallbackManager.getInstance().getCallbackFactory(cbInfo.getRuntime(), cbInfo); this.functionInfo = new NativeFunctionInfo(cbInfo.getRuntime(), cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT); }
? new Function(runtime, cbInfo.getMetaClass(), new CodeMemoryIO(runtime, address), cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT, runtime.getNil(), false)
NativeCallbackPointer(Ruby runtime, RubyClass klass, Closure.Handle handle, CallbackInfo cbInfo, NativeFunctionInfo closureInfo) { super(runtime, klass, cbInfo.getParameterTypes().length, new CallbackMemoryIO(runtime, handle)); this.cbInfo = cbInfo; this.closureInfo = closureInfo; }
return new CallbackInfo(context.runtime, (RubyClass) klass, (Type) returnType, nativeParamTypes, stdcall); } catch (UnsatisfiedLinkError ex) {
CallbackInfo.createCallbackInfoClass(runtime, ffi);
private final NativeFunctionInfo newFunctionInfo(Ruby runtime, CallbackInfo cbInfo) { org.jruby.ext.ffi.Type[] paramTypes = cbInfo.getParameterTypes(); for (int i = 0; i < paramTypes.length; ++i) { if (!isParameterTypeValid(paramTypes[i]) || FFIUtil.getFFIType(paramTypes[i]) == null) { throw runtime.newTypeError("invalid callback parameter type: " + paramTypes[i]); } } if (!isReturnTypeValid(cbInfo.getReturnType()) || FFIUtil.getFFIType(cbInfo.getReturnType()) == null) { throw runtime.newTypeError("invalid callback return type: " + cbInfo.getReturnType()); } return new NativeFunctionInfo(runtime, cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT); }
public CallbackDataConverter(CallbackInfo cbInfo) { this.callbackFactory = CallbackManager.getInstance().getCallbackFactory(cbInfo.getRuntime(), cbInfo); this.functionInfo = new NativeFunctionInfo(cbInfo.getRuntime(), cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT); }
? new Function(runtime, cbInfo.getMetaClass(), new CodeMemoryIO(runtime, address), cbInfo.getReturnType(), cbInfo.getParameterTypes(), cbInfo.isStdcall() ? CallingConvention.STDCALL : CallingConvention.DEFAULT, runtime.getNil(), false)
NativeCallbackPointer(Ruby runtime, RubyClass klass, Closure.Handle handle, CallbackInfo cbInfo, NativeFunctionInfo closureInfo) { super(runtime, klass, cbInfo.getParameterTypes().length, new CallbackMemoryIO(runtime, handle)); this.cbInfo = cbInfo; this.closureInfo = closureInfo; }