Method: Fiddle::Importer#import_symbol
- Defined in:
- lib/fiddle/import.rb
#import_symbol(name) ⇒ Object
Returns a new Fiddle::Pointer instance at the memory address of the given name
symbol.
Raises a DLError if the name
doesn’t exist.
See Fiddle::CompositeHandler.sym and Fiddle::Handle.sym
276 277 278 279 280 281 282 |
# File 'lib/fiddle/import.rb', line 276 def import_symbol(name) addr = handler.sym(name) if( !addr ) raise(DLError, "cannot find the symbol: #{name}") end Pointer.new(addr) end |