lib/ffi/clang/lib/cursor.rb in ffi-clang-0.1.2 vs lib/ffi/clang/lib/cursor.rb in ffi-clang-0.1.3

- old
+ new

@@ -21,10 +21,11 @@ # THE SOFTWARE. require 'ffi/clang/lib/translation_unit' require 'ffi/clang/lib/diagnostic' require 'ffi/clang/lib/comment' +require 'ffi/clang/lib/type' module FFI module Clang module Lib enum :kind, [:cursor_struct, 2, @@ -32,11 +33,12 @@ :cursor_enum_constant_decl, 7, :cursor_function, 8, :cursor_parm_decl, 10, :cursor_typedef_decl, 20, :cursor_invalid_file, 70, - :cursor_translation_unit, 300] + :cursor_translation_unit, 300 + ] class CXCursor < FFI::Struct layout( :kind, :kind, :xdata, :int, @@ -72,9 +74,13 @@ enum :child_visit_result, [:break, :continue, :recurse] callback :visit_children_function, [CXCursor.by_value, CXCursor.by_value, :pointer], :child_visit_result attach_function :visit_children, :clang_visitChildren, [CXCursor.by_value, :visit_children_function, :pointer], :uint + + attach_function :get_cursor_type, :clang_getCursorType, [CXCursor.by_value], CXType.by_value + attach_function :get_cursor_result_type, :clang_getCursorResultType, [CXCursor.by_value], CXType.by_value + end end end