class FFI::Clang::SpellingLocation

Attributes

column[R]
file[R]
line[R]
offset[R]

Public Class Methods

new(location) click to toggle source
Calls superclass method FFI::Clang::SourceLocation::new
# File lib/ffi/clang/source_location.rb, line 112
def initialize(location)
        super(location)

        cxfile = MemoryPointer.new :pointer
        line   = MemoryPointer.new :uint
        column = MemoryPointer.new :uint
        offset = MemoryPointer.new :uint

        Lib::get_spelling_location(@location, cxfile, line, column, offset)

        @file = Lib.extract_string Lib.get_file_name(cxfile.read_pointer)
        @line = line.get_uint(0)
        @column = column.get_uint(0)
        @offset = offset.get_uint(0)
end