Method: DL::CStructEntity#initialize

Defined in:
lib/dl/struct.rb

#initialize(addr, types, func = nil) ⇒ CStructEntity

Wraps the C pointer addr as a C struct with the given types. The C function func is called when the instance is garbage collected.

See also DL::CPtr.new



115
116
117
118
# File 'lib/dl/struct.rb', line 115

def initialize(addr, types, func = nil)
  set_ctypes(types)
  super(addr, @size, func)
end