Class: FFI::DynamicLibrary::Symbol
- Inherits:
-
Pointer
- Object
- AbstractMemory
- Pointer
- FFI::DynamicLibrary::Symbol
- Defined in:
- ext/ffi_c/DynamicLibrary.c,
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
Constants inherited from Pointer
Instance Method Summary collapse
-
#initialize_copy(other) ⇒ nil
DO NOT CALL THIS METHOD.
-
#inspect ⇒ String
Inspect.
Methods inherited from Pointer
#+, #==, #address, #autorelease=, #autorelease?, #free, #initialize, #null?, #order, #read_array_of_type, #read_string, #read_string_length, #read_string_to_null, size, #slice, #to_s, #type_size, #write_array_of_type, #write_string, #write_string_length
Methods inherited from AbstractMemory
#[], #__copy_from__, #clear, #get_array_of_float32, #get_array_of_float64, #get_array_of_pointer, #get_array_of_string, #get_bytes, #get_float32, #get_float64, #get_pointer, #get_string, #put_array_of_float32, #put_array_of_float64, #put_array_of_pointer, #put_bytes, #put_float32, #put_float64, #put_pointer, #put_string, #read_array_of_double, #read_array_of_float, #read_array_of_pointer, #read_bytes, #read_double, #read_float, #read_pointer, #total, #type_size, #write_array_of_double, #write_array_of_float, #write_array_of_pointer, #write_bytes, #write_double, #write_float, #write_pointer
Constructor Details
This class inherits a constructor from FFI::Pointer
Instance Method Details
#initialize_copy(other) ⇒ nil
DO NOT CALL THIS METHOD
219 220 221 222 223 224 |
# File 'ext/ffi_c/DynamicLibrary.c', line 219 static VALUE symbol_initialize_copy(VALUE self, VALUE other) { rb_raise(rb_eRuntimeError, "cannot duplicate symbol"); return Qnil; } |
#inspect ⇒ String
Inspect.
254 255 256 257 258 259 260 261 262 263 264 |
# File 'ext/ffi_c/DynamicLibrary.c', line 254 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); } |