Class: DL::Importable::Internal::Union

Inherits:
Struct
  • Object
show all
Defined in:
lib/dl/struct.rb

Overview

class Struct

Instance Method Summary collapse

Methods inherited from Struct

#initialize, #malloc, #members, #parse, #parse_elem, #size

Constructor Details

This class inherits a constructor from DL::Importable::Internal::Struct

Instance Method Details

#newObject



140
141
142
143
144
145
# File 'lib/dl/struct.rb', line 140

def new
  ptr = DL::malloc(@size)
  ptr.union!(@tys, *@names)
  mem = Memory.new(ptr, @names, @ty, @len, @enc, @dec)
  return mem
end