Class: FFI::DynamicLibrary::Symbol

Inherits:
Pointer
  • Object
show all
Defined in:
ext/ffi_c/DynamicLibrary.c

Constant Summary

Constants inherited from Pointer

Pointer::NULL, Pointer::SIZE

Instance Method Summary collapse

Methods inherited from Pointer

#+, #==, #address, #initialize, #null?, #read_array_of_int, #read_array_of_long, #read_array_of_pointer, #read_array_of_type, #read_float, #read_int, #read_long, #read_long_long, #read_pointer, #read_string, #read_string_length, #read_string_to_null, size, #write_array_of_int, #write_array_of_long, #write_array_of_pointer, #write_array_of_type, #write_float, #write_int, #write_long, #write_long_long, #write_pointer, #write_string, #write_string_length

Constructor Details

This class inherits a constructor from FFI::Pointer

Instance Method Details

#inspectObject



174
175
176
177
178
179
180
181
182
183
184
# File 'ext/ffi_c/DynamicLibrary.c', line 174

static VALUE
symbol_inspect(VALUE self)
{
    LibrarySymbol* sym;
    char buf[256];

    Data_Get_Struct(self, LibrarySymbol, sym);
    snprintf(buf, sizeof(buf), "#<FFI::Library::Symbol name=%s address=%p>",
             StringValueCStr(sym->name), sym->memory.address);
    return rb_str_new2(buf);
}