Class: RLTK::CG::TargetData

Inherits:
Object
  • Object
show all
Includes:
BindingClass
Defined in:
lib/rltk/cg/target.rb

Overview

This class represents data about a specific architecture. Currently it is for internal use only and should not be instantiated by users.

Instance Attribute Summary

Attributes included from BindingClass

#ptr

Instance Method Summary collapse

Methods included from BindingClass

#==

Constructor Details

#initialize(ptr) ⇒ TargetData

Returns a new instance of TargetData.

Parameters:

  • ptr (FFI::Pointer)


113
114
115
# File 'lib/rltk/cg/target.rb', line 113

def initialize(ptr)
	@ptr = ptr
end

Instance Method Details

#pointer_size(as) ⇒ Integer

Gets the pointer size for this target machine and address space combination.

Parameters:

  • as (Integer)

    Address space

Returns:

  • (Integer)

    Size of pointer



123
124
125
# File 'lib/rltk/cg/target.rb', line 123

def pointer_size(as)
	Bindings.pointer_size_for_as(@ptr, as)
end