Class: RLTK::CG::IntPtr
- Inherits:
-
SimpleIntType
- Object
- Type
- NumberType
- BasicIntType
- SimpleIntType
- RLTK::CG::IntPtr
- Defined in:
- lib/rltk/cg/type.rb
Overview
Integer the same size as a native pointer.
Instance Attribute Summary
Attributes included from BindingClass
Instance Method Summary collapse
-
#initialize(target_data, addr_space = nil, context = nil) ⇒ IntPtr
constructor
Create an integer that is the same size as a pointer on the target machine.
Methods inherited from BasicIntType
Methods inherited from NumberType
Methods inherited from Type
#allignment, #context, #dump, from_ptr, #hash, #kind, #size, #to_s
Methods included from BindingClass
Constructor Details
#initialize(target_data, addr_space = nil, context = nil) ⇒ IntPtr
Create an integer that is the same size as a pointer on the target machine. Additionally, an address space and a context may be provided.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/rltk/cg/type.rb', line 223 def initialize(target_data, addr_space = nil, context = nil) call = 'int_type' args = [target_data] if addr_space call += '_for_as' args << addr_space end if context call += '_in_context' args << context end Bindings.send(call.to_s, *args) end |