Method: Fiddle.dlwrap

Defined in:
fiddle.c

.dlwrap(val) ⇒ Object

Returns a memory pointer of a function’s hexadecimal address location val

Example:

lib = Fiddle.dlopen('/lib64/libc-2.15.so')
=> #<Fiddle::Handle:0x00000001342460>

Fiddle.dlwrap(lib['strcpy'].to_s(16))
=> 25522520


93
94
95
96
97
# File 'fiddle.c', line 93

static VALUE
rb_fiddle_value2ptr(VALUE self, VALUE val)
{
    return PTR2NUM((void*)val);
}