SwappedMemoryIO(Ruby runtime, MemoryIO io) { super(io.isDirect(), io.address()); this.runtime = runtime; this.io = io; }
/** * Gets the native memory address of this pointer. * * @return A long containing the native memory address. */ public final long getAddress() { return getMemoryIO().address(); }
BoundedNativeMemoryIO(Ruby runtime, MemoryIO parent, long offset, long size) { super(true, parent.address() + offset); this.runtime = runtime; this.size = size; this.parent = parent; if (!parent.isDirect()) throw new IllegalArgumentException("non-direct memory"); }
/** * Gets the native memory address of this pointer. * * @return A long containing the native memory address. */ public final long getAddress() { return getMemoryIO().address(); }
SwappedMemoryIO(Ruby runtime, MemoryIO io) { super(io.isDirect(), io.address()); this.runtime = runtime; this.io = io; }
BoundedNativeMemoryIO(Ruby runtime, MemoryIO parent, long offset, long size) { super(true, parent.address() + offset); this.runtime = runtime; this.size = size; this.parent = parent; if (!parent.isDirect()) throw new IllegalArgumentException("non-direct memory"); }
SwappedMemoryIO(Ruby runtime, MemoryIO io) { super(io.isDirect(), io.address()); this.runtime = runtime; this.io = io; }
BoundedNativeMemoryIO(Ruby runtime, MemoryIO parent, long offset, long size) { super(true, parent.address() + offset); this.runtime = runtime; this.size = size; this.parent = parent; if (!parent.isDirect()) throw new IllegalArgumentException("non-direct memory"); }
public final void putMemoryIO(long offset, MemoryIO value) { checkBounds(offset, ADDRESS_SIZE >> 3); putAddress(offset, value.address()); } public final byte getByte(long offset) {
public final void putMemoryIO(long offset, MemoryIO value) { checkBounds(offset, ADDRESS_SIZE >> 3); putAddress(offset, value.address()); } public final byte getByte(long offset) {
Function(Ruby runtime, RubyClass klass, MemoryIO address, NativeFunctionInfo functionInfo, IRubyObject enums) { super(runtime, klass, functionInfo.parameterTypes.length, address); this.functionInfo = functionInfo; function = new com.kenai.jffi.Function(address.address(), functionInfo.jffiReturnType, functionInfo.jffiParameterTypes, functionInfo.convention); this.enums = enums; this.saveError = true; // Wire up Function#call(*args) to use the super-fast native invokers getSingletonClass().addMethod("call", createDynamicMethod(getSingletonClass())); }
Function(Ruby runtime, RubyClass klass, MemoryIO address, NativeFunctionInfo functionInfo, IRubyObject enums) { super(runtime, klass, functionInfo.parameterTypes.length, address); this.functionInfo = functionInfo; function = new com.kenai.jffi.Function(address.address(), functionInfo.jffiReturnType, functionInfo.jffiParameterTypes, functionInfo.convention); this.enums = enums; this.saveError = true; // Wire up Function#call(*args) to use the super-fast native invokers getSingletonClass().addMethod("call", createDynamicMethod(getSingletonClass())); }
Function(Ruby runtime, RubyClass klass, MemoryIO address, NativeFunctionInfo functionInfo, IRubyObject enums) { super(runtime, klass, functionInfo.parameterTypes.length, address); this.functionInfo = functionInfo; function = new com.kenai.jffi.Function(address.address(), functionInfo.jffiReturnType, functionInfo.jffiParameterTypes, functionInfo.convention); this.enums = enums; this.saveError = true; // Wire up Function#call(*args) to use the super-fast native invokers getSingletonClass().addMethod("call", createDynamicMethod(getSingletonClass())); }
Function(Ruby runtime, RubyClass klass, MemoryIO address, NativeFunctionInfo functionInfo, IRubyObject enums) { super(runtime, klass, functionInfo.parameterTypes.length, address); this.functionInfo = functionInfo; function = new com.kenai.jffi.Function(address.address(), functionInfo.jffiReturnType, functionInfo.jffiParameterTypes, functionInfo.convention); this.enums = enums; this.saveError = true; // Wire up Function#call(*args) to use the super-fast native invokers getSingletonClass().addMethod("call", createDynamicMethod(getSingletonClass())); }
@Override public DynamicMethod createDynamicMethod(RubyModule module) { com.kenai.jffi.Function function = new com.kenai.jffi.Function(getMemoryIO().address(), closureInfo.jffiReturnType, closureInfo.jffiParameterTypes); return MethodFactory.createDynamicMethod(getRuntime(), module, function, closureInfo.returnType, closureInfo.parameterTypes, closureInfo.convention, getRuntime().getNil(), false); } }
Function(Ruby runtime, RubyClass klass, MemoryIO address, Type returnType, Type[] parameterTypes, CallingConvention convention, IRubyObject enums, boolean saveError) { super(runtime, klass, parameterTypes.length, address); this.functionInfo = new NativeFunctionInfo(runtime, returnType, parameterTypes, convention); function = new com.kenai.jffi.Function(address.address(), functionInfo.jffiReturnType, functionInfo.jffiParameterTypes, functionInfo.convention, saveError); this.enums = enums; this.saveError = saveError; // Wire up Function#call(*args) to use the super-fast native invokers getSingletonClass().addMethod("call", createDynamicMethod(getSingletonClass())); }
@Override public DynamicMethod createDynamicMethod(RubyModule module) { com.kenai.jffi.Function function = new com.kenai.jffi.Function(getMemoryIO().address(), closureInfo.jffiReturnType, closureInfo.jffiParameterTypes); return MethodFactory.createDynamicMethod(getRuntime(), module, function, closureInfo.returnType, closureInfo.parameterTypes, closureInfo.convention, getRuntime().getNil(), false); } }
Function(Ruby runtime, RubyClass klass, MemoryIO address, Type returnType, Type[] parameterTypes, CallingConvention convention, IRubyObject enums, boolean saveError) { super(runtime, klass, parameterTypes.length, address); this.functionInfo = new NativeFunctionInfo(runtime, returnType, parameterTypes, convention); function = new com.kenai.jffi.Function(address.address(), functionInfo.jffiReturnType, functionInfo.jffiParameterTypes, functionInfo.convention, saveError); this.enums = enums; this.saveError = saveError; // Wire up Function#call(*args) to use the super-fast native invokers getSingletonClass().addMethod("call", createDynamicMethod(getSingletonClass())); }
@Override public DynamicMethod createDynamicMethod(RubyModule module) { com.kenai.jffi.Function function = new com.kenai.jffi.Function(getMemoryIO().address(), closureInfo.jffiReturnType, closureInfo.jffiParameterTypes); return MethodFactory.createDynamicMethod(getRuntime(), module, function, closureInfo.returnType, closureInfo.parameterTypes, closureInfo.convention, getRuntime().getNil(), false); } }
Function(Ruby runtime, RubyClass klass, MemoryIO address, Type returnType, Type[] parameterTypes, CallingConvention convention, IRubyObject enums, boolean saveError) { super(runtime, klass, parameterTypes.length, address); this.functionInfo = new NativeFunctionInfo(runtime, returnType, parameterTypes, convention); function = new com.kenai.jffi.Function(address.address(), functionInfo.jffiReturnType, functionInfo.jffiParameterTypes, functionInfo.convention, saveError); this.enums = enums; this.saveError = saveError; // Wire up Function#call(*args) to use the super-fast native invokers getSingletonClass().addMethod("call", createDynamicMethod(getSingletonClass())); }