public CodeMemoryIO(Ruby runtime, Pointer pointer) { super(runtime, true, pointer.getAddress(), "code region is inaccessible"); this.pointer = pointer; } }
public CodeMemoryIO(Ruby runtime, Pointer pointer) { super(runtime, true, pointer.getAddress(), "code region is inaccessible"); this.pointer = pointer; } }
public CodeMemoryIO(Ruby runtime, Pointer pointer) { super(runtime, true, pointer.getAddress(), "code region is inaccessible"); this.pointer = pointer; } }
public CodeMemoryIO(Ruby runtime, Pointer pointer) { super(runtime, true, pointer.getAddress(), "code region is inaccessible"); this.pointer = pointer; } }
@JRubyMethod(name = "==", required = 1) public IRubyObject op_equal(ThreadContext context, IRubyObject obj) { return context.runtime.newBoolean(this == obj || getAddress() == 0L && obj.isNil() || (obj instanceof Pointer && ((Pointer) obj).getAddress() == getAddress())); }
@JRubyMethod(name = "==", required = 1) public IRubyObject op_equal(ThreadContext context, IRubyObject obj) { return context.runtime.newBoolean(this == obj || getAddress() == 0L && obj.isNil() || (obj instanceof Pointer && ((Pointer) obj).getAddress() == getAddress())); }
@JRubyMethod(name = "==", required = 1) public IRubyObject op_equal(ThreadContext context, IRubyObject obj) { return context.runtime.newBoolean(this == obj || getAddress() == 0L && obj.isNil() || (obj instanceof Pointer && ((Pointer) obj).getAddress() == getAddress())); }
@JRubyMethod(name = "==", required = 1) public IRubyObject op_equal(ThreadContext context, IRubyObject obj) { return context.runtime.newBoolean(this == obj || getAddress() == 0L && obj.isNil() || (obj instanceof Pointer && ((Pointer) obj).getAddress() == getAddress())); }
@JRubyMethod(name = { "address", "to_i" }) public IRubyObject address(ThreadContext context) { return context.runtime.newFixnum(getAddress()); }
@JRubyMethod(name = { "address", "to_i" }) public IRubyObject address(ThreadContext context) { return context.runtime.newFixnum(getAddress()); }
@JRubyMethod(name = { "address", "to_i" }) public IRubyObject address(ThreadContext context) { return context.runtime.newFixnum(getAddress()); }
@JRubyMethod(name = { "address", "to_i" }) public IRubyObject address(ThreadContext context) { return context.runtime.newFixnum(getAddress()); }
@Override @JRubyMethod(name = { "to_s", "inspect" }, optional = 1) public IRubyObject to_s(ThreadContext context, IRubyObject[] args) { String s = size != Long.MAX_VALUE ? String.format("#<%s address=0x%x size=%s>", getMetaClass().getName(), getAddress(), size) : String.format("#<%s address=0x%x>", getMetaClass().getName(), getAddress()); return RubyString.newString(context.runtime, s); }
@Override @JRubyMethod(name = { "to_s", "inspect" }, optional = 1) public IRubyObject to_s(ThreadContext context, IRubyObject[] args) { String s = size != Long.MAX_VALUE ? String.format("#<%s address=0x%x size=%s>", getMetaClass().getName(), getAddress(), size) : String.format("#<%s address=0x%x>", getMetaClass().getName(), getAddress()); return RubyString.newString(context.runtime, s); }
@Override @JRubyMethod(name = { "to_s", "inspect" }, optional = 1) public IRubyObject to_s(ThreadContext context, IRubyObject[] args) { String s = size != Long.MAX_VALUE ? String.format("#<%s address=0x%x size=%s>", getMetaClass().getName(), getAddress(), size) : String.format("#<%s address=0x%x>", getMetaClass().getName(), getAddress()); return RubyString.newString(context.runtime, s); }
@Override @JRubyMethod(name = { "to_s", "inspect" }, optional = 1) public IRubyObject to_s(ThreadContext context, IRubyObject[] args) { String s = size != Long.MAX_VALUE ? String.format("#<%s address=0x%x size=%s>", getMetaClass().getName(), getAddress(), size) : String.format("#<%s address=0x%x>", getMetaClass().getName(), getAddress()); return RubyString.newString(context.runtime, s); }
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); }
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); }
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); }