Class: FFI::Clang::Types::Function

Inherits:
Type
  • Object
show all
Defined in:
lib/ffi/clang/types/function.rb

Instance Attribute Summary

Attributes inherited from Type

#translation_unit, #type

Instance Method Summary collapse

Methods inherited from Type

#==, #alignof, #const_qualified?, create, #declaration, #initialize, #kind, #kind_spelling, #pod?, #ref_qualifier, #restrict_qualified?, #sizeof, #spelling, #to_s, #volatile_qualified?

Constructor Details

This class inherits a constructor from FFI::Clang::Types::Type

Instance Method Details

#arg_type(i) ⇒ Object



13
14
15
# File 'lib/ffi/clang/types/function.rb', line 13

def arg_type(i)
	Type.create Lib.get_arg_type(@type, i), @translation_unit
end

#args_sizeObject



9
10
11
# File 'lib/ffi/clang/types/function.rb', line 9

def args_size
	Lib.get_num_arg_types(@type)
end

#calling_convObject



21
22
23
# File 'lib/ffi/clang/types/function.rb', line 21

def calling_conv
	Lib.get_fuction_type_calling_conv(@type)
end

#result_typeObject



17
18
19
# File 'lib/ffi/clang/types/function.rb', line 17

def result_type
	Type.create Lib.get_result_type(@type), @translation_unit
end

#variadic?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/ffi/clang/types/function.rb', line 5

def variadic?
	Lib.is_function_type_variadic(@type) != 0
end