An instance of this class represents a library symbol. It may be a {Pointer pointer} to a function or to a variable.
static VALUE
symbol_initialize_copy(VALUE self, VALUE other)
{
rb_raise(rb_eRuntimeError, "cannot duplicate symbol");
return Qnil;
}
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->base.memory.address);
return rb_str_new2(buf);
}
Generated with the Darkfish Rdoc Generator 2.