Class: FFI::Struct
- Inherits:
-
Object
- Object
- FFI::Struct
- Defined in:
- lib/ffi-compiler/fake_ffi/ffi.rb
Constant Summary collapse
- TypeMap =
{}
Class Method Summary collapse
Class Method Details
.by_ref ⇒ Object
166 167 168 |
# File 'lib/ffi-compiler/fake_ffi/ffi.rb', line 166 def self.by_ref StructByReference.new(self) end |
.by_value ⇒ Object
162 163 164 |
# File 'lib/ffi-compiler/fake_ffi/ffi.rb', line 162 def self.by_value StructByValue.new(self) end |
.find_type(type) ⇒ Object
151 152 153 154 155 156 157 158 159 160 |
# File 'lib/ffi-compiler/fake_ffi/ffi.rb', line 151 def self.find_type(type) t = TypeMap[type] return t unless t.nil? if type.is_a?(Class) && type < Struct return TypeMap[type] = StructByValue.new(type) end TypeMap[type] = FFI.find_type(type) end |