ref

ref Instance Public methods Returns a new Fiddle::Pointer instance that is a reference pointer for this pointer. Analogous to the ampersand operator in C.

size

size Instance Public methods Get the size of this pointer.

size=

size=(size) Instance Public methods Set the size of this pointer to size

to_i

to_i Instance Public methods Returns the integer memory location of this pointer.

to_int

to_i Instance Public methods Returns the integer memory location of this pointer.

to_s

ptr.to_s => stringptr.to_s(len) => string Instance Public methods Returns the pointer contents as a string. When called with no arguments, this method will return the contents until the first NULL byte. When called with len, a string of len bytes will be returned. See #to_str

to_str

ptr.to_str => stringptr.to_str(len) => string Instance Public methods Returns the pointer contents as a string. When called with no arguments, this method will return the contents with the length of this pointer's size. When called with len, a string of len bytes will be returned. See #to_s

to_value

to_value Instance Public methods Cast this pointer to a ruby object.

dlopen

dlopen(library) => Fiddle::Handle Class Public methods Creates a new handler that opens library, and returns an instance of Fiddle::Handle. See Fiddle::Handle.new for more.

dlunwrap

Fiddle.dlunwrap(addr) Class Public methods Returns the hexadecimal representation of a memory pointer address addr Example: lib = Fiddle.dlopen('/lib64/libc-2.15.so') => #<Fiddle::Handle:0x00000001342460> lib['strcpy'].to_s(16) => "7f59de6dd240" Fiddle.dlunwrap(Fiddle.dlwrap(lib['strcpy'].to_s(16))) => "7f59de6dd240"