Class: FFI::DynamicLibrary::Symbol
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
FFI::Pointer
|
Defined in: | ext/ffi_c/DynamicLibrary.c |
Overview
An instance of this class represents a library symbol. It may be a pointer to a function or to a variable.
Constant Summary
Class Method Summary
::FFI::Pointer
- Inherited
.new | A new instance of |
.size | Return the size of a pointer on the current platform, in bytes. |
Instance Attribute Summary
::FFI::Pointer
- Inherited
::FFI::AbstractMemory
- Inherited
#size_limit? | Return |
Instance Method Summary
::FFI::Pointer
- Inherited
#+, #==, | |
#address | Alias for Pointer#to_i. |
#free, | |
#initialize_copy | This method is internally used by |
#inspect | Alias for Pointer#to_s. |
#order | Get or set |
#read | Read pointer’s contents as |
#read_array_of_type | Read an array of |
#read_string | Read pointer’s contents as a string, or the first |
#read_string_length | Read the first |
#read_string_to_null | Read pointer’s contents as a string. |
#slice, #to_i, #to_ptr, #to_s, #type_size, | |
#write | Write |
#write_array_of_type | Write |
#write_string | Write |
#write_string_length | Write |
::FFI::AbstractMemory
- Inherited
Constructor Details
This class inherits a constructor from FFI::Pointer
Instance Method Details
#initialize_copy(other)
NOT(CALL)
# File 'ext/ffi_c/DynamicLibrary.c', line 264
static VALUE symbol_initialize_copy(VALUE self, VALUE other) { rb_raise(rb_eRuntimeError, "cannot duplicate symbol"); return Qnil; }
#inspect
Inspect
# File 'ext/ffi_c/DynamicLibrary.c', line 315
static VALUE symbol_inspect(VALUE self) { LibrarySymbol* sym; char buf[256]; TypedData_Get_Struct(self, LibrarySymbol, &library_symbol_data_type, sym); snprintf(buf, sizeof(buf), "#<FFI::DynamicLibrary::Symbol name=%s address=%p>", StringValueCStr(sym->name), sym->base.memory.address); return rb_str_new2(buf); }