)
# :ptr_data ::
- # (FFI::Pointer(*Void))
+ # (FFI::Pointer(*Void))
class Token < FFI::Struct
layout :int_data, [:uint, 4],
:ptr_data, :pointer
end
-
+
# Determine the kind of the given token.
- #
+
# @method get_token_kind(token)
- # @param [Token] token
- # @return [Symbol from _enum_token_kind_]
+ # @param [Token] token
+ # @return [Symbol from _enum_token_kind_]
# @scope class
attach_function :get_token_kind, :clang_getTokenKind, [Token.by_value], :token_kind
-
# Determine the spelling of the given token.
- #
+
# The spelling of a token is the textual representation of that token, e.g.,
# the text of an identifier or keyword.
- #
+
# @method get_token_spelling(translation_unit_impl, token)
- # @param [TranslationUnitImpl] translation_unit_impl
- # @param [Token] token
- # @return [String]
+ # @param [TranslationUnitImpl] translation_unit_impl
+ # @param [Token] token
+ # @return [String]
# @scope class
attach_function :get_token_spelling, :clang_getTokenSpelling, [TranslationUnitImpl, Token.by_value], String.by_value
-
# Retrieve the source location of the given token.
- #
+
# @method get_token_location(translation_unit_impl, token)
- # @param [TranslationUnitImpl] translation_unit_impl
- # @param [Token] token
- # @return [SourceLocation]
+ # @param [TranslationUnitImpl] translation_unit_impl
+ # @param [Token] token
+ # @return [SourceLocation]
# @scope class
attach_function :get_token_location, :clang_getTokenLocation, [TranslationUnitImpl, Token.by_value], SourceLocation.by_value
-
# Retrieve a source range that covers the given token.
- #
+
# @method get_token_extent(translation_unit_impl, token)
- # @param [TranslationUnitImpl] translation_unit_impl
- # @param [Token] token
- # @return [SourceRange]
+ # @param [TranslationUnitImpl] translation_unit_impl
+ # @param [Token] token
+ # @return [SourceRange]
# @scope class
attach_function :get_token_extent, :clang_getTokenExtent, [TranslationUnitImpl, Token.by_value], SourceRange.by_value
-
# Tokenize the source code described by the given range into raw
# lexical tokens.
- #
+
# @method tokenize(tu, range, tokens, num_tokens)
# @param [TranslationUnitImpl] tu the translation unit whose text is being tokenized.
# @param [SourceRange] range the source range in which text should be tokenized. All of the
@@ -3028,99 +2907,92 @@ class Token < FFI::Struct
# freed with clang_disposeTokens() before the translation unit is destroyed.
# @param [FFI::Pointer(*UInt)] num_tokens will be set to the number of tokens in the \c *Tokens
# array.
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :tokenize, :clang_tokenize, [TranslationUnitImpl, SourceRange.by_value, :pointer, :pointer], :void
-
# Annotate the given set of tokens by providing cursors for each token
# that can be mapped to a specific entity within the abstract syntax tree.
- #
+
# This token-annotation routine is equivalent to invoking
# clang_getCursor() for the source locations of each of the
# tokens. The cursors provided are filtered, so that only those
# cursors that have a direct correspondence to the token are
# accepted. For example, given a function call \c f(x),
# clang_getCursor() would provide the following cursors:
- #
+
# * when the cursor is over the 'f', a DeclRefExpr cursor referring to 'f'.
# * when the cursor is over the '(' or the ')', a CallExpr referring to 'f'.
# * when the cursor is over the 'x', a DeclRefExpr cursor referring to 'x'.
- #
+
# Only the first and last of these cursors will occur within the
# annotate, since the tokens "f" and "x' directly refer to a function
# and a variable, respectively, but the parentheses are just a small
# part of the full syntax of the function call expression, which is
# not provided as an annotation.
- #
+
# @method annotate_tokens(tu, tokens, num_tokens, cursors)
# @param [TranslationUnitImpl] tu the translation unit that owns the given tokens.
# @param [Token] tokens the set of tokens to annotate.
# @param [Integer] num_tokens the number of tokens in \p Tokens.
# @param [Cursor] cursors an array of \p NumTokens cursors, whose contents will be
# replaced with the cursors corresponding to each token.
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :annotate_tokens, :clang_annotateTokens, [TranslationUnitImpl, Token, :uint, Cursor], :void
-
# Free the given set of tokens.
- #
+
# @method dispose_tokens(tu, tokens, num_tokens)
- # @param [TranslationUnitImpl] tu
- # @param [Token] tokens
- # @param [Integer] num_tokens
- # @return [nil]
+ # @param [TranslationUnitImpl] tu
+ # @param [Token] tokens
+ # @param [Integer] num_tokens
+ # @return [nil]
# @scope class
attach_function :dispose_tokens, :clang_disposeTokens, [TranslationUnitImpl, Token, :uint], :void
-
# for debug/testing
- #
+
# @method get_cursor_kind_spelling(kind)
- # @param [Symbol from _enum_cursor_kind_] kind
- # @return [String]
+ # @param [Symbol from _enum_cursor_kind_] kind
+ # @return [String]
# @scope class
attach_function :get_cursor_kind_spelling, :clang_getCursorKindSpelling, [:cursor_kind], String.by_value
-
# (Not documented)
- #
+
# @method get_definition_spelling_and_extent(cursor, start_buf, end_buf, start_line, start_column, end_line, end_column)
- # @param [Cursor] cursor
- # @param [FFI::Pointer(**CharS)] start_buf
- # @param [FFI::Pointer(**CharS)] end_buf
- # @param [FFI::Pointer(*UInt)] start_line
- # @param [FFI::Pointer(*UInt)] start_column
- # @param [FFI::Pointer(*UInt)] end_line
- # @param [FFI::Pointer(*UInt)] end_column
- # @return [nil]
+ # @param [Cursor] cursor
+ # @param [FFI::Pointer(**CharS)] start_buf
+ # @param [FFI::Pointer(**CharS)] end_buf
+ # @param [FFI::Pointer(*UInt)] start_line
+ # @param [FFI::Pointer(*UInt)] start_column
+ # @param [FFI::Pointer(*UInt)] end_line
+ # @param [FFI::Pointer(*UInt)] end_column
+ # @return [nil]
# @scope class
attach_function :get_definition_spelling_and_extent, :clang_getDefinitionSpellingAndExtent, [Cursor.by_value, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :void
-
# (Not documented)
- #
+
# @method enable_stack_traces()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :enable_stack_traces, :clang_enableStackTraces, [], :void
-
# (Not documented)
- #
+
# @method execute_on_thread(fn, user_data, stack_size)
- # @param [FFI::Pointer(*)] fn
- # @param [FFI::Pointer(*Void)] user_data
- # @param [Integer] stack_size
- # @return [nil]
+ # @param [FFI::Pointer(*FunctionProto)] fn
+ # @param [FFI::Pointer(*Void)] user_data
+ # @param [Integer] stack_size
+ # @return [nil]
# @scope class
attach_function :execute_on_thread, :clang_executeOnThread, [:pointer, :pointer, :uint], :void
-
# A single result of code completion.
- #
+
# = Fields:
# :cursor_kind ::
# (Symbol from _enum_cursor_kind_) The kind of entity that this completion refers to.
- #
+
# The cursor kind will be a macro, keyword, or a declaration (one of the
# *Decl cursor kinds), describing the entity that the completion is
# referring to.
- #
+
# \todo In the future, we would like to provide a full cursor, to allow
# the client to extract additional information from declaration.
# :completion_string ::
@@ -3130,31 +3002,31 @@ class CompletionResult < FFI::Struct
layout :cursor_kind, :cursor_kind,
:completion_string, :pointer
end
-
+
# Describes a single piece of text within a code-completion string.
- #
+
# Each "chunk" within a code-completion string (\c CXCompletionString) is
# either a piece of text with a specific "kind" that describes how that text
# should be interpreted by the client or is another completion string.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:completion_chunk_kind).
- #
+
# === Options:
# :optional ::
# A code-completion string that describes "optional" text that
# could be a part of the template (but is not required).
- #
+
# The Optional chunk is the only kind of chunk that has a code-completion
# string for its representation, which is accessible via
# \c clang_getCompletionChunkCompletionString(). The code-completion string
# describes an additional part of the template that is completely optional.
# For example, optional chunks can be used to describe the placeholders for
# arguments that match up with defaulted function parameters, e.g. given:
- #
+
# \code
# void f(int x, float y = 3.14, double z = 2.71828);
# \endcode
- #
+
# The code-completion string for this function would contain:
# - a TypedText chunk for "f".
# - a LeftParen chunk for "(".
@@ -3166,7 +3038,7 @@ class CompletionResult < FFI::Struct
# - a Comma chunk for ","
# - a Placeholder chunk for "double z"
# - a RightParen chunk for ")"
- #
+
# There are many ways to handle Optional chunks. Two simple approaches are:
# - Completely ignore optional chunks, in which case the template for the
# function "f" would only include the first parameter ("int x").
@@ -3175,7 +3047,7 @@ class CompletionResult < FFI::Struct
# :typed_text ::
# Text that a user would be expected to type to get this
# code-completion result.
- #
+
# There will be exactly one "typed text" chunk in a semantic string, which
# will typically provide the spelling of a keyword or the name of a
# declaration that could be used at the current code point. Clients are
@@ -3183,13 +3055,13 @@ class CompletionResult < FFI::Struct
# chunk.
# :text ::
# Text that should be inserted as part of a code-completion result.
- #
+
# A "text" chunk represents text that is part of the template to be
# inserted into user code should this particular code-completion result
# be selected.
# :placeholder ::
# Placeholder text that should be replaced by the user.
- #
+
# A "placeholder" chunk marks a place where the user should insert text
# into the code-completion template. For example, placeholders might mark
# the function parameters for a function declaration, to indicate that the
@@ -3199,7 +3071,7 @@ class CompletionResult < FFI::Struct
# :informative ::
# Informative text that should be displayed but never inserted as
# part of the template.
- #
+
# An "informative" chunk contains annotations that can be displayed to
# help the user decide whether a particular code-completion result is the
# right option, but which is not part of the actual template to be inserted
@@ -3207,15 +3079,15 @@ class CompletionResult < FFI::Struct
# :current_parameter ::
# Text that describes the current parameter when code-completion is
# referring to function call, message send, or template specialization.
- #
+
# A "current parameter" chunk occurs when code-completion is providing
# information about a parameter corresponding to the argument at the
# code-completion point. For example, given a function
- #
+
# \code
# int add(int x, int y);
# \endcode
- #
+
# and the source code \c add(, where the code-completion point is after the
# "(", the code-completion string will contain a "current parameter" chunk
# for "int x", indicating that the current argument will initialize that
@@ -3244,7 +3116,7 @@ class CompletionResult < FFI::Struct
# A comma separator (',').
# :result_type ::
# Text that specifies the result type of a given result.
- #
+
# This special kind of informative chunk is not meant to be inserted into
# the text buffer. Rather, it is meant to illustrate the type that an
# expression using the given completion string would have.
@@ -3259,7 +3131,7 @@ class CompletionResult < FFI::Struct
# :vertical_space ::
# Vertical space ('\n'), after which it is generally a good idea to
# perform indentation.
- #
+
# @method _enum_completion_chunk_kind_
# @return [Symbol]
# @scope class
@@ -3286,29 +3158,27 @@ class CompletionResult < FFI::Struct
:horizontal_space, 19,
:vertical_space, 20
]
-
+
# Determine the kind of a particular chunk within a completion string.
- #
+
# @method get_completion_chunk_kind(completion_string, chunk_number)
# @param [FFI::Pointer(CompletionString)] completion_string the completion string to query.
# @param [Integer] chunk_number the 0-based index of the chunk in the completion string.
# @return [Symbol from _enum_completion_chunk_kind_] the kind of the chunk at the index \c chunk_number.
# @scope class
attach_function :get_completion_chunk_kind, :clang_getCompletionChunkKind, [:pointer, :uint], :completion_chunk_kind
-
# Retrieve the text associated with a particular chunk within a
# completion string.
- #
+
# @method get_completion_chunk_text(completion_string, chunk_number)
# @param [FFI::Pointer(CompletionString)] completion_string the completion string to query.
# @param [Integer] chunk_number the 0-based index of the chunk in the completion string.
# @return [String] the text associated with the chunk at index \c chunk_number.
# @scope class
attach_function :get_completion_chunk_text, :clang_getCompletionChunkText, [:pointer, :uint], String.by_value
-
# Retrieve the completion string associated with a particular chunk
# within a completion string.
- #
+
# @method get_completion_chunk_completion_string(completion_string, chunk_number)
# @param [FFI::Pointer(CompletionString)] completion_string the completion string to query.
# @param [Integer] chunk_number the 0-based index of the chunk in the completion string.
@@ -3316,49 +3186,44 @@ class CompletionResult < FFI::Struct
# \c chunk_number.
# @scope class
attach_function :get_completion_chunk_completion_string, :clang_getCompletionChunkCompletionString, [:pointer, :uint], :pointer
-
# Retrieve the number of chunks in the given code-completion string.
- #
+
# @method get_num_completion_chunks(completion_string)
- # @param [FFI::Pointer(CompletionString)] completion_string
- # @return [Integer]
+ # @param [FFI::Pointer(CompletionString)] completion_string
+ # @return [Integer]
# @scope class
attach_function :get_num_completion_chunks, :clang_getNumCompletionChunks, [:pointer], :uint
-
# Determine the priority of this code completion.
- #
+
# The priority of a code completion indicates how likely it is that this
# particular completion is the completion that the user will select. The
# priority is selected by various internal heuristics.
- #
+
# @method get_completion_priority(completion_string)
# @param [FFI::Pointer(CompletionString)] completion_string The completion string to query.
# @return [Integer] The priority of this completion string. Smaller values indicate
# higher-priority (more likely) completions.
# @scope class
attach_function :get_completion_priority, :clang_getCompletionPriority, [:pointer], :uint
-
# Determine the availability of the entity that this code-completion
# string refers to.
- #
+
# @method get_completion_availability(completion_string)
# @param [FFI::Pointer(CompletionString)] completion_string The completion string to query.
# @return [Symbol from _enum_availability_kind_] The availability of the completion string.
# @scope class
attach_function :get_completion_availability, :clang_getCompletionAvailability, [:pointer], :availability_kind
-
# Retrieve the number of annotations associated with the given
# completion string.
- #
+
# @method get_completion_num_annotations(completion_string)
# @param [FFI::Pointer(CompletionString)] completion_string the completion string to query.
# @return [Integer] the number of annotations associated with the given completion
# string.
# @scope class
attach_function :get_completion_num_annotations, :clang_getCompletionNumAnnotations, [:pointer], :uint
-
# Retrieve the annotation associated with the given completion string.
- #
+
# @method get_completion_annotation(completion_string, annotation_number)
# @param [FFI::Pointer(CompletionString)] completion_string the completion string to query.
# @param [Integer] annotation_number the 0-based index of the annotation of the
@@ -3367,23 +3232,21 @@ class CompletionResult < FFI::Struct
# \c annotation_number, or a NULL string if that annotation is not available.
# @scope class
attach_function :get_completion_annotation, :clang_getCompletionAnnotation, [:pointer, :uint], String.by_value
-
# Retrieve a completion string for an arbitrary declaration or macro
# definition cursor.
- #
+
# @method get_cursor_completion_string(cursor)
# @param [Cursor] cursor The cursor to query.
# @return [FFI::Pointer(CompletionString)] A non-context-sensitive completion string for declaration and macro
# definition cursors, or NULL for other kinds of cursors.
# @scope class
attach_function :get_cursor_completion_string, :clang_getCursorCompletionString, [Cursor.by_value], :pointer
-
# Contains the results of code-completion.
- #
+
# This data structure contains the results of code completion, as
# produced by \c clang_codeCompleteAt(). Its contents must be freed by
# \c clang_disposeCodeCompleteResults.
- #
+
# = Fields:
# :results ::
# (CompletionResult) The code-completion results.
@@ -3394,15 +3257,15 @@ class CodeCompleteResults < FFI::Struct
layout :results, CompletionResult,
:num_results, :uint
end
-
+
# Flags that can be passed to \c clang_codeCompleteAt() to
# modify its behavior.
- #
+
# The enumerators in this enumeration can be bitwise-OR'd together to
# provide multiple options to \c clang_codeCompleteAt().
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:code_complete_flags).
- #
+
# === Options:
# :include_macros ::
# Whether to include macros within the set of code
@@ -3410,7 +3273,7 @@ class CodeCompleteResults < FFI::Struct
# :include_code_patterns ::
# Whether to include code patterns for language constructs
# within the set of code completions, e.g., for loops.
- #
+
# @method _enum_code_complete_flags_
# @return [Symbol]
# @scope class
@@ -3418,14 +3281,14 @@ class CodeCompleteResults < FFI::Struct
:include_macros, 1,
:include_code_patterns, 2
]
-
+
# Bits that represent the context under which completion is occurring.
- #
+
# The enumerators in this enumeration may be bitwise-OR'd together if multiple
# contexts are occurring simultaneously.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:completion_context).
- #
+
# === Options:
# :unexposed ::
# The context for completions is unexposed, as only Clang results
@@ -3492,7 +3355,7 @@ class CodeCompleteResults < FFI::Struct
# Natural language completions should be included in the results.
# :unknown ::
# The current context is unknown, so set all contexts.
- #
+
# @method _enum_completion_context_
# @return [Symbol]
# @scope class
@@ -3522,17 +3385,16 @@ class CodeCompleteResults < FFI::Struct
:natural_language, 2097152,
:unknown, 4194303
]
-
+
# Returns a default set of code-completion options that can be
# passed to\c clang_codeCompleteAt().
- #
+
# @method default_code_complete_options()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :default_code_complete_options, :clang_defaultCodeCompleteOptions, [], :uint
-
# Perform code completion at a given location in a translation unit.
- #
+
# This function performs code completion at a particular file, line, and
# column within source code, providing results that suggest potential
# code snippets based on the context of the completion. The basic model
@@ -3543,7 +3405,7 @@ class CodeCompleteResults < FFI::Struct
# current location in the C/Objective-C/C++ grammar and the state of
# semantic analysis, what completions to provide. These completions are
# returned via a new \c CXCodeCompleteResults structure.
- #
+
# Code completion itself is meant to be triggered by the client when the
# user types punctuation characters or whitespace, at which point the
# code-completion location will coincide with the cursor. For example, if \c p
@@ -3560,7 +3422,7 @@ class CodeCompleteResults < FFI::Struct
# is to separate the relatively high-latency acquisition of code-completion
# results from the filtering of results on a per-character basis, which must
# have a lower latency.
- #
+
# @method code_complete_at(tu, complete_filename, complete_line, complete_column, unsaved_files, num_unsaved_files, options)
# @param [TranslationUnitImpl] tu The translation unit in which code-completion should
# occur. The source files for this translation unit need not be
@@ -3593,36 +3455,32 @@ class CodeCompleteResults < FFI::Struct
# completion fails, returns NULL.
# @scope class
attach_function :code_complete_at, :clang_codeCompleteAt, [TranslationUnitImpl, :string, :uint, :uint, UnsavedFile, :uint, :uint], CodeCompleteResults
-
# Sort the code-completion results in case-insensitive alphabetical
# order.
- #
+
# @method sort_code_completion_results(results, num_results)
# @param [CompletionResult] results The set of results to sort.
# @param [Integer] num_results The number of results in \p Results.
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :sort_code_completion_results, :clang_sortCodeCompletionResults, [CompletionResult, :uint], :void
-
# Free the given set of code-completion results.
- #
+
# @method dispose_code_complete_results(results)
- # @param [CodeCompleteResults] results
- # @return [nil]
+ # @param [CodeCompleteResults] results
+ # @return [nil]
# @scope class
attach_function :dispose_code_complete_results, :clang_disposeCodeCompleteResults, [CodeCompleteResults], :void
-
# Determine the number of diagnostics produced prior to the
# location where code completion was performed.
- #
+
# @method code_complete_get_num_diagnostics(results)
- # @param [CodeCompleteResults] results
- # @return [Integer]
+ # @param [CodeCompleteResults] results
+ # @return [Integer]
# @scope class
attach_function :code_complete_get_num_diagnostics, :clang_codeCompleteGetNumDiagnostics, [CodeCompleteResults], :uint
-
# Retrieve a diagnostic associated with the given code completion.
- #
+
# @method code_complete_get_diagnostic(results, index)
# @param [CodeCompleteResults] results the code completion results to query.
# @param [Integer] index the zero-based diagnostic number to retrieve.
@@ -3630,23 +3488,21 @@ class CodeCompleteResults < FFI::Struct
# via a call to \c clang_disposeDiagnostic().
# @scope class
attach_function :code_complete_get_diagnostic, :clang_codeCompleteGetDiagnostic, [CodeCompleteResults, :uint], :pointer
-
# Determines what compeltions are appropriate for the context
# the given code completion.
- #
+
# @method code_complete_get_contexts(results)
# @param [CodeCompleteResults] results the code completion results to query
# @return [Integer] the kinds of completions that are appropriate for use
# along with the given code completion results.
# @scope class
attach_function :code_complete_get_contexts, :clang_codeCompleteGetContexts, [CodeCompleteResults], :ulong_long
-
# Returns the cursor kind for the container for the current code
# completion context. The container is only guaranteed to be set for
# contexts where a container exists (i.e. member accesses or Objective-C
# message sends); if there is not a container, this function will return
# CXCursor_InvalidCode.
- #
+
# @method code_complete_get_container_kind(results, is_incomplete)
# @param [CodeCompleteResults] results the code completion results to query
# @param [FFI::Pointer(*UInt)] is_incomplete on return, this value will be false if Clang has complete
@@ -3656,128 +3512,119 @@ class CodeCompleteResults < FFI::Struct
# container
# @scope class
attach_function :code_complete_get_container_kind, :clang_codeCompleteGetContainerKind, [CodeCompleteResults, :pointer], :cursor_kind
-
# Returns the USR for the container for the current code completion
# context. If there is not a container for the current context, this
# function will return the empty string.
- #
+
# @method code_complete_get_container_usr(results)
# @param [CodeCompleteResults] results the code completion results to query
# @return [String] the USR for the container
# @scope class
attach_function :code_complete_get_container_usr, :clang_codeCompleteGetContainerUSR, [CodeCompleteResults], String.by_value
-
# Returns the currently-entered selector for an Objective-C message
# send, formatted like "initWithFoo:bar:". Only guaranteed to return a
# non-empty string for CXCompletionContext_ObjCInstanceMessage and
# CXCompletionContext_ObjCClassMessage.
- #
+
# @method code_complete_get_obj_c_selector(results)
# @param [CodeCompleteResults] results the code completion results to query
# @return [String] the selector (or partial selector) that has been entered thus far
# for an Objective-C message send.
# @scope class
attach_function :code_complete_get_obj_c_selector, :clang_codeCompleteGetObjCSelector, [CodeCompleteResults], String.by_value
-
# Return a version string, suitable for showing to a user, but not
# intended to be parsed (the format is not guaranteed to be stable).
- #
+
# @method get_clang_version()
- # @return [String]
+ # @return [String]
# @scope class
attach_function :get_clang_version, :clang_getClangVersion, [], String.by_value
-
# Enable/disable crash recovery.
- #
+
# @method toggle_crash_recovery(is_enabled)
# @param [Integer] is_enabled to indicate if crash recovery is enabled. A non-zero value
# enables crash recovery, while 0 disables it.
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :toggle_crash_recovery, :clang_toggleCrashRecovery, [:uint], :void
-
# Visitor invoked for each file in a translation unit
# (used with clang_getInclusions()).
- #
+
# This visitor function will be invoked by clang_getInclusions() for each
# file included (either at the top-level or by #include directives) within
# a translation unit. The first argument is the file being included, and
# the second and third arguments provide the inclusion stack. The
# array is sorted in order of immediate inclusion. For example,
# the first element refers to the location that included 'included_file'.
- #
+
# This entry is only for documentation and no real method.
- #
- # @method _callback_inclusion_visitor_(inclusion_stack, include_len, client_data)
- # @param [SourceLocation] inclusion_stack
- # @param [Integer] include_len
- # @param [FFI::Pointer(ClientData)] client_data
- # @return [FFI::Pointer(File)]
- # @scope class
- callback :inclusion_visitor, [SourceLocation, :uint, :pointer], :pointer
-
+
+ # @method _callback_inclusion_visitor_(included_file, inclusion_stack, include_len, client_data)
+ # @param [FFI::Pointer(File)] included_file
+ # @param [SourceLocation] inclusion_stack
+ # @param [Integer] include_len
+ # @param [FFI::Pointer(ClientData)] client_data
+ # @return [FFI::Pointer(File)]
+ # @scope class
+ callback :inclusion_visitor, [:pointer, SourceLocation, :uint, :pointer], :pointer
+
# Visit the set of preprocessor inclusions in a translation unit.
# The visitor function is called with the provided data for every included
# file. This does not include headers included by the PCH file (unless one
# is inspecting the inclusions in the PCH file itself).
- #
+
# @method get_inclusions(tu, visitor, client_data)
- # @param [TranslationUnitImpl] tu
- # @param [Proc(_callback_inclusion_visitor_)] visitor
- # @param [FFI::Pointer(ClientData)] client_data
- # @return [nil]
+ # @param [TranslationUnitImpl] tu
+ # @param [FFI::Pointer(InclusionVisitor)] visitor
+ # @param [FFI::Pointer(ClientData)] client_data
+ # @return [nil]
# @scope class
- attach_function :get_inclusions, :clang_getInclusions, [TranslationUnitImpl, :inclusion_visitor, :pointer], :void
-
+ attach_function :get_inclusions, :clang_getInclusions, [TranslationUnitImpl, :pointer, :pointer], :void
# Retrieve a remapping.
- #
+
# @method get_remappings(path)
# @param [String] path the path that contains metadata about remappings.
# @return [FFI::Pointer(Remapping)] the requested remapping. This remapping must be freed
# via a call to \c clang_remap_dispose(). Can return NULL if an error occurred.
# @scope class
attach_function :get_remappings, :clang_getRemappings, [:string], :pointer
-
# Determine the number of remappings.
- #
+
# @method remap_get_num_files(remapping)
- # @param [FFI::Pointer(Remapping)] remapping
- # @return [Integer]
+ # @param [FFI::Pointer(Remapping)] remapping
+ # @return [Integer]
# @scope class
attach_function :remap_get_num_files, :clang_remap_getNumFiles, [:pointer], :uint
-
# Get the original and the associated filename from the remapping.
- #
+
# @method remap_get_filenames(remapping, index, original, transformed)
- # @param [FFI::Pointer(Remapping)] remapping
- # @param [Integer] index
+ # @param [FFI::Pointer(Remapping)] remapping
+ # @param [Integer] index
# @param [String] original If non-NULL, will be set to the original filename.
# @param [String] transformed If non-NULL, will be set to the filename that the original
# is associated with.
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :remap_get_filenames, :clang_remap_getFilenames, [:pointer, :uint, String, String], :void
-
# Dispose the remapping.
- #
+
# @method remap_dispose(remapping)
- # @param [FFI::Pointer(Remapping)] remapping
- # @return [nil]
+ # @param [FFI::Pointer(Remapping)] remapping
+ # @return [nil]
# @scope class
attach_function :remap_dispose, :clang_remap_dispose, [:pointer], :void
-
# \defgroup CINDEX_HIGH Higher level API functions
- #
+
# @{
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:visitor_result).
- #
+
# === Options:
# :visit_break ::
- #
+
# :visit_continue ::
- #
- #
+
+
# @method _enum_visitor_result_
# @return [Symbol]
# @scope class
@@ -3785,21 +3632,21 @@ class CodeCompleteResults < FFI::Struct
:visit_break, 0,
:visit_continue, 1
]
-
+
# (Not documented)
- #
+
# = Fields:
# :context ::
- # (FFI::Pointer(*Void))
+ # (FFI::Pointer(*Void))
# :visit ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
class CursorAndRangeVisitor < FFI::Struct
layout :context, :pointer,
:visit, :pointer
end
-
+
# Find references of a declaration in a specific file.
- #
+
# @method find_references_in_file(cursor, file, visitor)
# @param [Cursor] cursor pointing to a declaration or a reference of one.
# @param [FFI::Pointer(File)] file to search for references.
@@ -3807,8 +3654,7 @@ class CursorAndRangeVisitor < FFI::Struct
# each reference found.
# The CXSourceRange will point inside the file; if the reference is inside
# a macro (and not a macro argument) the CXSourceRange will be invalid.
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :find_references_in_file, :clang_findReferencesInFile, [Cursor.by_value, :pointer, CursorAndRangeVisitor.by_value], :void
-
end
diff --git a/test/output/include/capi/cef_app_capi.rb b/test/output/include/capi/cef_app_capi.rb
index 1353aa6..5565cd2 100644
--- a/test/output/include/capi/cef_app_capi.rb
+++ b/test/output/include/capi/cef_app_capi.rb
@@ -1,22 +1,19 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
- # (Not documented)
- class App < FFI::Struct
- layout :dummy, :char
- end
-
+
# This function should be called from the application entry point function to
# execute a secondary process. It can be used to run secondary processes from
# the browser client executable (default behavior) or from a separate
@@ -25,106 +22,95 @@ class App < FFI::Struct
# it will return immediately with a value of -1. If called for a recognized
# secondary process it will block until the process should exit and then return
# the process exit code. The |application| parameter may be NULL.
- #
+
# @method execute_process(args, application)
- # @param [FFI::Pointer(*MainArgs)] args
- # @param [App] application
- # @return [Integer]
+ # @param [FFI::Pointer(*MainArgs)] args
+ # @param [FFI::Pointer(*App)] application
+ # @return [Integer]
# @scope class
- attach_function :execute_process, :cef_execute_process, [:pointer, App], :int
-
- # (Not documented)
- class App < FFI::Struct
- layout :dummy, :char
- end
-
+ attach_function :execute_process, :cef_execute_process, [:pointer, :pointer], :int
# This function should be called on the main application thread to initialize
# the CEF browser process. The |application| parameter may be NULL. A return
# value of true (1) indicates that it succeeded and false (0) indicates that it
# failed.
- #
+
# @method initialize(args, settings, application)
- # @param [FFI::Pointer(*MainArgs)] args
- # @param [FFI::Pointer(*Settings)] settings
- # @param [App] application
- # @return [Integer]
+ # @param [FFI::Pointer(*MainArgs)] args
+ # @param [FFI::Pointer(*Settings)] settings
+ # @param [FFI::Pointer(*App)] application
+ # @return [Integer]
# @scope class
- attach_function :initialize, :cef_initialize, [:pointer, :pointer, App], :int
-
+ attach_function :initialize, :cef_initialize, [:pointer, :pointer, :pointer], :int
# This function should be called on the main application thread to shut down
# the CEF browser process before the application exits.
- #
+
# @method shutdown()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :shutdown, :cef_shutdown, [], :void
-
# Perform a single iteration of CEF message loop processing. This function is
# used to integrate the CEF message loop into an existing application message
# loop. Care must be taken to balance performance against excessive CPU usage.
# This function should only be called on the main application thread and only
# if cef_initialize() is called with a CefSettings.multi_threaded_message_loop
# value of false (0). This function will not block.
- #
+
# @method do_message_loop_work()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :do_message_loop_work, :cef_do_message_loop_work, [], :void
-
# Run the CEF message loop. Use this function instead of an application-
# provided message loop to get the best balance between performance and CPU
# usage. This function should only be called on the main application thread and
# only if cef_initialize() is called with a
# CefSettings.multi_threaded_message_loop value of false (0). This function
# will block until a quit message is received by the system.
- #
+
# @method run_message_loop()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :run_message_loop, :cef_run_message_loop, [], :void
-
# Quit the CEF message loop that was started by calling cef_run_message_loop().
# This function should only be called on the main application thread and only
# if cef_run_message_loop() was used.
- #
+
# @method quit_message_loop()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :quit_message_loop, :cef_quit_message_loop, [], :void
-
# (Not documented)
class CommandLine < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class SchemeRegistrar < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class ResourceBundleHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class BrowserProcessHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class RenderProcessHandler < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to provide handler implementations. Methods will be
# called by the process and/or thread indicated.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_before_command_line_processing ::
- # (FFI::Pointer(*)) Provides an opportunity to view and/or modify command-line arguments before
+ # (FFI::Pointer(*FunctionProto)) Provides an opportunity to view and/or modify command-line arguments before
# processing by CEF and Chromium. The |process_type| value will be NULL for
# the browser process. Do not keep a reference to the cef_command_line_t
# object passed to this function. The CefSettings.command_line_args_disabled
@@ -134,20 +120,20 @@ class RenderProcessHandler < FFI::Struct
# modify command-line arguments for non-browser processes as this may result
# in undefined behavior including crashes.
# :on_register_custom_schemes ::
- # (FFI::Pointer(*)) Provides an opportunity to register custom schemes. Do not keep a reference
+ # (FFI::Pointer(*FunctionProto)) Provides an opportunity to register custom schemes. Do not keep a reference
# to the |registrar| object. This function is called on the main thread for
# each process and the registered schemes should be the same across all
# processes.
# :get_resource_bundle_handler ::
- # (FFI::Pointer(*)) Return the handler for resource bundle events. If
+ # (FFI::Pointer(*FunctionProto)) Return the handler for resource bundle events. If
# CefSettings.pack_loading_disabled is true (1) a handler must be returned.
# If no handler is returned resources will be loaded from pack files. This
# function is called by the browser and render processes on multiple threads.
# :get_browser_process_handler ::
- # (FFI::Pointer(*)) Return the handler for functionality specific to the browser process. This
+ # (FFI::Pointer(*FunctionProto)) Return the handler for functionality specific to the browser process. This
# function is called on multiple threads in the browser process.
# :get_render_process_handler ::
- # (FFI::Pointer(*)) Return the handler for functionality specific to the render process. This
+ # (FFI::Pointer(*FunctionProto)) Return the handler for functionality specific to the render process. This
# function is called on the render process main thread.
class App < FFI::Struct
layout :base, :char,
@@ -157,5 +143,5 @@ class App < FFI::Struct
:get_browser_process_handler, :pointer,
:get_render_process_handler, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_base_capi.rb b/test/output/include/capi/cef_base_capi.rb
index 86556a9..3ae5fe9 100644
--- a/test/output/include/capi/cef_base_capi.rb
+++ b/test/output/include/capi/cef_base_capi.rb
@@ -1,35 +1,37 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure defining the reference count implementation functions. All
# framework structures must include the cef_base_t structure first.
- #
+
# = Fields:
# :size ::
# (Integer) Size of the data structure.
# :add_ref ::
- # (FFI::Pointer(*)) Increment the reference count.
+ # (FFI::Pointer(*FunctionProto)) Increment the reference count.
# :release ::
- # (FFI::Pointer(*)) Decrement the reference count. Delete this object when no references
+ # (FFI::Pointer(*FunctionProto)) Decrement the reference count. Delete this object when no references
# remain.
# :get_refct ::
- # (FFI::Pointer(*)) Returns the current number of references.
+ # (FFI::Pointer(*FunctionProto)) Returns the current number of references.
class Base < FFI::Struct
- layout :size, :ulong,
+ layout :size, :int,
:add_ref, :pointer,
:release, :pointer,
:get_refct, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_browser_capi.rb b/test/output/include/capi/cef_browser_capi.rb
index aa09e59..8aa264b 100644
--- a/test/output/include/capi/cef_browser_capi.rb
+++ b/test/output/include/capi/cef_browser_capi.rb
@@ -1,76 +1,78 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class ProcessMessage < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to represent a browser window. When used in the browser
# process the functions of this structure may be called on any thread unless
# otherwise indicated in the comments. When used in the render process the
# functions of this structure may only be called on the main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_host ::
- # (FFI::Pointer(*)) Returns the browser host object. This function can only be called in the
+ # (FFI::Pointer(*FunctionProto)) Returns the browser host object. This function can only be called in the
# browser process.
# :can_go_back ::
- # (FFI::Pointer(*)) Returns true (1) if the browser can navigate backwards.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the browser can navigate backwards.
# :go_back ::
- # (FFI::Pointer(*)) Navigate backwards.
+ # (FFI::Pointer(*FunctionProto)) Navigate backwards.
# :can_go_forward ::
- # (FFI::Pointer(*)) Returns true (1) if the browser can navigate forwards.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the browser can navigate forwards.
# :go_forward ::
- # (FFI::Pointer(*)) Navigate forwards.
+ # (FFI::Pointer(*FunctionProto)) Navigate forwards.
# :is_loading ::
- # (FFI::Pointer(*)) Returns true (1) if the browser is currently loading.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the browser is currently loading.
# :reload ::
- # (FFI::Pointer(*)) Reload the current page.
+ # (FFI::Pointer(*FunctionProto)) Reload the current page.
# :reload_ignore_cache ::
- # (FFI::Pointer(*)) Reload the current page ignoring any cached data.
+ # (FFI::Pointer(*FunctionProto)) Reload the current page ignoring any cached data.
# :stop_load ::
- # (FFI::Pointer(*)) Stop loading the page.
+ # (FFI::Pointer(*FunctionProto)) Stop loading the page.
# :get_identifier ::
- # (FFI::Pointer(*)) Returns the globally unique identifier for this browser.
+ # (FFI::Pointer(*FunctionProto)) Returns the globally unique identifier for this browser.
# :is_popup ::
- # (FFI::Pointer(*)) Returns true (1) if the window is a popup window.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the window is a popup window.
# :has_document ::
- # (FFI::Pointer(*)) Returns true (1) if a document has been loaded in the browser.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if a document has been loaded in the browser.
# :get_main_frame ::
- # (FFI::Pointer(*)) Returns the main (top-level) frame for the browser window.
+ # (FFI::Pointer(*FunctionProto)) Returns the main (top-level) frame for the browser window.
# :get_focused_frame ::
- # (FFI::Pointer(*)) Returns the focused frame for the browser window.
+ # (FFI::Pointer(*FunctionProto)) Returns the focused frame for the browser window.
# :get_frame_byident ::
- # (FFI::Pointer(*)) Returns the frame with the specified identifier, or NULL if not found.
+ # (FFI::Pointer(*FunctionProto)) Returns the frame with the specified identifier, or NULL if not found.
# :get_frame ::
- # (FFI::Pointer(*)) Returns the frame with the specified name, or NULL if not found.
- # :get_frame_count ::
- # (FFI::Pointer(*)) Returns the number of frames that currently exist.
+ # (FFI::Pointer(*FunctionProto)) Returns the frame with the specified name, or NULL if not found.
+ # :size ::
+ # (error_unknown) Returns the number of frames that currently exist.
# :get_frame_identifiers ::
- # (FFI::Pointer(*)) Returns the identifiers of all existing frames.
+ # (FFI::Pointer(*FunctionProto)) Returns the identifiers of all existing frames.
# :get_frame_names ::
- # (FFI::Pointer(*)) Returns the names of all existing frames.
+ # (FFI::Pointer(*FunctionProto)) Returns the names of all existing frames.
# :send_process_message ::
- # (FFI::Pointer(*)) Send a message to the specified |target_process|. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Send a message to the specified |target_process|. Returns true (1) if the
# message was sent successfully.
class Browser < FFI::Struct
layout :base, :char,
@@ -90,48 +92,48 @@ class Browser < FFI::Struct
:get_focused_frame, :pointer,
:get_frame_byident, :pointer,
:get_frame, :pointer,
- :get_frame_count, :pointer,
+ :size, :char,
:get_frame_identifiers, :pointer,
:get_frame_names, :pointer,
:send_process_message, :pointer
end
-
+
# (Not documented)
class Client < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to represent the browser process aspects of a browser window.
# The functions of this structure can only be called in the browser process.
# They may be called on any thread in that process unless otherwise indicated
# in the comments.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_browser ::
- # (FFI::Pointer(*)) Returns the hosted browser object.
+ # (FFI::Pointer(*FunctionProto)) Returns the hosted browser object.
# :parent_window_will_close ::
- # (FFI::Pointer(*)) Call this function before destroying a contained browser window. This
+ # (FFI::Pointer(*FunctionProto)) Call this function before destroying a contained browser window. This
# function performs any internal cleanup that may be needed before the
# browser window is destroyed.
# :close_browser ::
- # (FFI::Pointer(*)) Closes this browser window.
+ # (FFI::Pointer(*FunctionProto)) Closes this browser window.
# :set_focus ::
- # (FFI::Pointer(*)) Set focus for the browser window. If |enable| is true (1) focus will be set
+ # (FFI::Pointer(*FunctionProto)) Set focus for the browser window. If |enable| is true (1) focus will be set
# to the window. Otherwise, focus will be removed.
# :get_window_handle ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :get_opener_window_handle ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :get_client ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto)) Returns the client for this browser.
# :get_dev_tools_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_zoom_level ::
- # (FFI::Pointer(*)) Get the zoom level. This function can only be called on the UI thread.
+ # (FFI::Pointer(*FunctionProto)) Get the zoom level. This function can only be called on the UI thread.
# :set_zoom_level ::
- # (FFI::Pointer(*)) Change the zoom level to the specified value.
+ # (FFI::Pointer(*FunctionProto)) Change the zoom level to the specified value.
class BrowserHost < FFI::Struct
layout :base, :char,
:get_browser, :pointer,
@@ -145,32 +147,30 @@ class BrowserHost < FFI::Struct
:get_zoom_level, :pointer,
:set_zoom_level, :pointer
end
-
+
# Create a new browser window using the window parameters specified by
# |windowInfo|. All values will be copied internally and the actual window will
# be created on the UI thread. This function can be called on any browser
# process thread and will not block.
- #
+
# @method browser_host_create_browser(window_info, client, url, settings)
- # @param [FFI::Pointer(*WindowInfo)] window_info
- # @param [Client] client
- # @param [FFI::Pointer(*String)] url
- # @param [FFI::Pointer(*BrowserSettings)] settings
- # @return [Integer]
+ # @param [FFI::Pointer(*WindowInfo)] window_info
+ # @param [Client] client
+ # @param [FFI::Pointer(*String)] url
+ # @param [FFI::Pointer(*BrowserSettings)] settings
+ # @return [Integer]
# @scope class
attach_function :browser_host_create_browser, :cef_browser_host_create_browser, [:pointer, Client, :pointer, :pointer], :int
-
# Create a new browser window using the window parameters specified by
# |windowInfo|. This function can only be called on the browser process UI
# thread.
- #
+
# @method browser_host_create_browser_sync(window_info, client, url, settings)
- # @param [FFI::Pointer(*WindowInfo)] window_info
- # @param [Client] client
- # @param [FFI::Pointer(*String)] url
- # @param [FFI::Pointer(*BrowserSettings)] settings
- # @return [Browser]
+ # @param [FFI::Pointer(*WindowInfo)] window_info
+ # @param [Client] client
+ # @param [FFI::Pointer(*String)] url
+ # @param [FFI::Pointer(*BrowserSettings)] settings
+ # @return [Browser]
# @scope class
attach_function :browser_host_create_browser_sync, :cef_browser_host_create_browser_sync, [:pointer, Client, :pointer, :pointer], Browser
-
end
diff --git a/test/output/include/capi/cef_browser_process_handler_capi.rb b/test/output/include/capi/cef_browser_process_handler_capi.rb
index 981bf4a..2233e17 100644
--- a/test/output/include/capi/cef_browser_process_handler_capi.rb
+++ b/test/output/include/capi/cef_browser_process_handler_capi.rb
@@ -1,40 +1,42 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class ProxyHandler < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to implement browser process callbacks. The functions of this
# structure will be called on the browser process main thread unless otherwise
# indicated.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_proxy_handler ::
- # (FFI::Pointer(*)) Return the handler for proxy events. If no handler is returned the default
+ # (FFI::Pointer(*FunctionProto)) Return the handler for proxy events. If no handler is returned the default
# system handler will be used. This function is called on the browser process
# IO thread.
# :on_context_initialized ::
- # (FFI::Pointer(*)) Called on the browser process UI thread immediately after the CEF context
+ # (FFI::Pointer(*FunctionProto)) Called on the browser process UI thread immediately after the CEF context
# has been initialized.
class BrowserProcessHandler < FFI::Struct
layout :base, :char,
:get_proxy_handler, :pointer,
:on_context_initialized, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_callback_capi.rb b/test/output/include/capi/cef_callback_capi.rb
index 55417e2..1447d52 100644
--- a/test/output/include/capi/cef_callback_capi.rb
+++ b/test/output/include/capi/cef_callback_capi.rb
@@ -1,30 +1,32 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Generic callback structure used for asynchronous continuation.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :cont ::
- # (FFI::Pointer(*)) Continue processing.
+ # (FFI::Pointer(*FunctionProto)) Continue processing.
# :cancel ::
- # (FFI::Pointer(*)) Cancel processing.
+ # (FFI::Pointer(*FunctionProto)) Cancel processing.
class Callback < FFI::Struct
layout :base, :char,
:cont, :pointer,
:cancel, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_client_capi.rb b/test/output/include/capi/cef_client_capi.rb
index 4b7931c..cfa6f34 100644
--- a/test/output/include/capi/cef_client_capi.rb
+++ b/test/output/include/capi/cef_client_capi.rb
@@ -1,100 +1,102 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class ContextMenuHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class DisplayHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class FocusHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class GeolocationHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class JsdialogHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class KeyboardHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class LifeSpanHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class LoadHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class RequestHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class ProcessMessage < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to provide handler implementations.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_context_menu_handler ::
- # (FFI::Pointer(*)) Return the handler for context menus. If no handler is provided the default
+ # (FFI::Pointer(*FunctionProto)) Return the handler for context menus. If no handler is provided the default
# implementation will be used.
# :get_display_handler ::
- # (FFI::Pointer(*)) Return the handler for browser display state events.
+ # (FFI::Pointer(*FunctionProto)) Return the handler for browser display state events.
# :get_focus_handler ::
- # (FFI::Pointer(*)) Return the handler for focus events.
+ # (FFI::Pointer(*FunctionProto)) Return the handler for focus events.
# :get_geolocation_handler ::
- # (FFI::Pointer(*)) Return the handler for geolocation permissions requests. If no handler is
+ # (FFI::Pointer(*FunctionProto)) Return the handler for geolocation permissions requests. If no handler is
# provided geolocation access will be denied by default.
# :get_jsdialog_handler ::
- # (FFI::Pointer(*)) Return the handler for JavaScript dialogs. If no handler is provided the
+ # (FFI::Pointer(*FunctionProto)) Return the handler for JavaScript dialogs. If no handler is provided the
# default implementation will be used.
# :get_keyboard_handler ::
- # (FFI::Pointer(*)) Return the handler for keyboard events.
+ # (FFI::Pointer(*FunctionProto)) Return the handler for keyboard events.
# :get_life_span_handler ::
- # (FFI::Pointer(*)) Return the handler for browser life span events.
+ # (FFI::Pointer(*FunctionProto)) Return the handler for browser life span events.
# :get_load_handler ::
- # (FFI::Pointer(*)) Return the handler for browser load status events.
+ # (FFI::Pointer(*FunctionProto)) Return the handler for browser load status events.
# :get_request_handler ::
- # (FFI::Pointer(*)) Return the handler for browser request events.
+ # (FFI::Pointer(*FunctionProto)) Return the handler for browser request events.
# :on_process_message_received ::
- # (FFI::Pointer(*)) Called when a new message is received from a different process. Return true
+ # (FFI::Pointer(*FunctionProto)) Called when a new message is received from a different process. Return true
# (1) if the message was handled or false (0) otherwise. Do not keep a
# reference to or attempt to access the message outside of this callback.
class Client < FFI::Struct
@@ -110,5 +112,5 @@ class Client < FFI::Struct
:get_request_handler, :pointer,
:on_process_message_received, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_command_line_capi.rb b/test/output/include/capi/cef_command_line_capi.rb
index 76b2ba5..fa99ea9 100644
--- a/test/output/include/capi/cef_command_line_capi.rb
+++ b/test/output/include/capi/cef_command_line_capi.rb
@@ -1,17 +1,19 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure used to create and/or parse command line arguments. Arguments with
# '--', '-' and, on Windows, '/' prefixes are considered switches. Switches
# will always precede any arguments without switch prefixes. Switches can
@@ -20,54 +22,54 @@ def self.attach_function(name, *_)
# subsequent tokens, regardless of prefix, being interpreted as non-switch
# arguments. Switch names are considered case-insensitive. This structure can
# be used before cef_initialize() is called.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_valid ::
- # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions
# if this function returns false (0).
# :is_read_only ::
- # (FFI::Pointer(*)) Returns true (1) if the values of this object are read-only. Some APIs may
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the values of this object are read-only. Some APIs may
# expose read-only objects.
# :copy ::
- # (FFI::Pointer(*)) Returns a writable copy of this object.
+ # (FFI::Pointer(*FunctionProto)) Returns a writable copy of this object.
# :init_from_argv ::
- # (FFI::Pointer(*)) Initialize the command line with the specified |argc| and |argv| values.
+ # (FFI::Pointer(*FunctionProto)) Initialize the command line with the specified |argc| and |argv| values.
# The first argument must be the name of the program. This function is only
# supported on non-Windows platforms.
# :init_from_string ::
- # (FFI::Pointer(*)) Initialize the command line with the string returned by calling
+ # (FFI::Pointer(*FunctionProto)) Initialize the command line with the string returned by calling
# GetCommandLineW(). This function is only supported on Windows.
# :reset ::
- # (FFI::Pointer(*)) Reset the command-line switches and arguments but leave the program
+ # (FFI::Pointer(*FunctionProto)) Reset the command-line switches and arguments but leave the program
# component unchanged.
# :get_command_line_string ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_program ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :set_program ::
- # (FFI::Pointer(*)) Set the program part of the command line string (the first item).
+ # (FFI::Pointer(*FunctionProto)) Set the program part of the command line string (the first item).
# :has_switches ::
- # (FFI::Pointer(*)) Returns true (1) if the command line has switches.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the command line has switches.
# :has_switch ::
- # (FFI::Pointer(*)) Returns true (1) if the command line contains the given switch.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the command line contains the given switch.
# :get_switch_value ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_switches ::
- # (FFI::Pointer(*)) Returns the map of switch names and values. If a switch has no value an
+ # (FFI::Pointer(*FunctionProto)) Returns the map of switch names and values. If a switch has no value an
# NULL string is returned.
# :append_switch ::
- # (FFI::Pointer(*)) Add a switch to the end of the command line. If the switch has no value
+ # (FFI::Pointer(*FunctionProto)) Add a switch to the end of the command line. If the switch has no value
# pass an NULL value string.
# :append_switch_with_value ::
- # (FFI::Pointer(*)) Add a switch with the specified value to the end of the command line.
+ # (FFI::Pointer(*FunctionProto)) Add a switch with the specified value to the end of the command line.
# :has_arguments ::
- # (FFI::Pointer(*)) True if there are remaining command line arguments.
+ # (FFI::Pointer(*FunctionProto)) True if there are remaining command line arguments.
# :get_arguments ::
- # (FFI::Pointer(*)) Get the remaining command line arguments.
+ # (FFI::Pointer(*FunctionProto)) Get the remaining command line arguments.
# :append_argument ::
- # (FFI::Pointer(*)) Add an argument to the end of the command line.
+ # (FFI::Pointer(*FunctionProto)) Add an argument to the end of the command line.
class CommandLine < FFI::Struct
layout :base, :char,
:is_valid, :pointer,
@@ -89,20 +91,18 @@ class CommandLine < FFI::Struct
:get_arguments, :pointer,
:append_argument, :pointer
end
-
+
# Create a new cef_command_line_t instance.
- #
+
# @method command_line_create()
- # @return [CommandLine]
+ # @return [CommandLine]
# @scope class
attach_function :command_line_create, :cef_command_line_create, [], CommandLine
-
# Returns the singleton global cef_command_line_t object. The returned object
# will be read-only.
- #
+
# @method command_line_get_global()
- # @return [CommandLine]
+ # @return [CommandLine]
# @scope class
attach_function :command_line_get_global, :cef_command_line_get_global, [], CommandLine
-
end
diff --git a/test/output/include/capi/cef_context_menu_handler_capi.rb b/test/output/include/capi/cef_context_menu_handler_capi.rb
index b4e500f..a4341a0 100644
--- a/test/output/include/capi/cef_context_menu_handler_capi.rb
+++ b/test/output/include/capi/cef_context_menu_handler_capi.rb
@@ -1,76 +1,78 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class ContextMenuParams < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class MenuModel < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class ContextMenuParams < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle context menu events. The functions of this
# structure will be called on the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_before_context_menu ::
- # (FFI::Pointer(*)) Called before a context menu is displayed. |params| provides information
+ # (FFI::Pointer(*FunctionProto)) Called before a context menu is displayed. |params| provides information
# about the context menu state. |model| initially contains the default
# context menu. The |model| can be cleared to show no context menu or
# modified to show a custom menu. Do not keep references to |params| or
# |model| outside of this callback.
# :on_context_menu_command ::
- # (FFI::Pointer(*)) Called to execute a command selected from the context menu. Return true (1)
+ # (FFI::Pointer(*FunctionProto)) Called to execute a command selected from the context menu. Return true (1)
# if the command was handled or false (0) for the default implementation. See
# cef_menu_id_t for the command ids that have default implementations. All
# user-defined command ids should be between MENU_ID_USER_FIRST and
@@ -78,7 +80,7 @@ class Frame < FFI::Struct
# on_before_context_menu(). Do not keep a reference to |params| outside of
# this callback.
# :on_context_menu_dismissed ::
- # (FFI::Pointer(*)) Called when the context menu is dismissed irregardless of whether the menu
+ # (FFI::Pointer(*FunctionProto)) Called when the context menu is dismissed irregardless of whether the menu
# was NULL or a command was selected.
class ContextMenuHandler < FFI::Struct
layout :base, :char,
@@ -86,50 +88,50 @@ class ContextMenuHandler < FFI::Struct
:on_context_menu_command, :pointer,
:on_context_menu_dismissed, :pointer
end
-
+
# Provides information about the context menu state. The ethods of this
# structure can only be accessed on browser process the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_xcoord ::
- # (FFI::Pointer(*)) Returns the X coordinate of the mouse where the context menu was invoked.
+ # (FFI::Pointer(*FunctionProto)) Returns the X coordinate of the mouse where the context menu was invoked.
# Coords are relative to the associated RenderView's origin.
# :get_ycoord ::
- # (FFI::Pointer(*)) Returns the Y coordinate of the mouse where the context menu was invoked.
+ # (FFI::Pointer(*FunctionProto)) Returns the Y coordinate of the mouse where the context menu was invoked.
# Coords are relative to the associated RenderView's origin.
# :get_type_flags ::
- # (FFI::Pointer(*)) Returns flags representing the type of node that the context menu was
+ # (FFI::Pointer(*FunctionProto)) Returns flags representing the type of node that the context menu was
# invoked on.
# :get_link_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_unfiltered_link_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_source_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :is_image_blocked ::
- # (FFI::Pointer(*)) Returns true (1) if the context menu was invoked on a blocked image.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the context menu was invoked on a blocked image.
# :get_page_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_frame_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_frame_charset ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_media_type ::
- # (FFI::Pointer(*)) Returns the type of context node that the context menu was invoked on.
+ # (FFI::Pointer(*FunctionProto)) Returns the type of context node that the context menu was invoked on.
# :get_media_state_flags ::
- # (FFI::Pointer(*)) Returns flags representing the actions supported by the media element, if
+ # (FFI::Pointer(*FunctionProto)) Returns flags representing the actions supported by the media element, if
# any, that the context menu was invoked on.
# :get_selection_text ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :is_editable ::
- # (FFI::Pointer(*)) Returns true (1) if the context menu was invoked on an editable node.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the context menu was invoked on an editable node.
# :is_speech_input_enabled ::
- # (FFI::Pointer(*)) Returns true (1) if the context menu was invoked on an editable node where
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the context menu was invoked on an editable node where
# speech-input is enabled.
# :get_edit_state_flags ::
- # (FFI::Pointer(*)) Returns flags representing the actions supported by the editable node, if
+ # (FFI::Pointer(*FunctionProto)) Returns flags representing the actions supported by the editable node, if
# any, that the context menu was invoked on.
class ContextMenuParams < FFI::Struct
layout :base, :char,
@@ -150,5 +152,5 @@ class ContextMenuParams < FFI::Struct
:is_speech_input_enabled, :pointer,
:get_edit_state_flags, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_cookie_capi.rb b/test/output/include/capi/cef_cookie_capi.rb
index 6a61f4e..5a1015c 100644
--- a/test/output/include/capi/cef_cookie_capi.rb
+++ b/test/output/include/capi/cef_cookie_capi.rb
@@ -1,55 +1,57 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class CookieVisitor < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class CookieVisitor < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used for managing cookies. The functions of this structure may be
# called on any thread unless otherwise indicated.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :set_supported_schemes ::
- # (FFI::Pointer(*)) Set the schemes supported by this manager. By default only "http" and
+ # (FFI::Pointer(*FunctionProto)) Set the schemes supported by this manager. By default only "http" and
# "https" schemes are supported. Must be called before any cookies are
# accessed.
# :visit_all_cookies ::
- # (FFI::Pointer(*)) Visit all cookies. The returned cookies are ordered by longest path, then
+ # (FFI::Pointer(*FunctionProto)) Visit all cookies. The returned cookies are ordered by longest path, then
# by earliest creation date. Returns false (0) if cookies cannot be accessed.
# :visit_url_cookies ::
- # (FFI::Pointer(*)) Visit a subset of cookies. The results are filtered by the given url
+ # (FFI::Pointer(*FunctionProto)) Visit a subset of cookies. The results are filtered by the given url
# scheme, host, domain and path. If |includeHttpOnly| is true (1) HTTP-only
# cookies will also be included in the results. The returned cookies are
# ordered by longest path, then by earliest creation date. Returns false (0)
# if cookies cannot be accessed.
# :set_cookie ::
- # (FFI::Pointer(*)) Sets a cookie given a valid URL and explicit user-provided cookie
+ # (FFI::Pointer(*FunctionProto)) Sets a cookie given a valid URL and explicit user-provided cookie
# attributes. This function expects each attribute to be well-formed. It will
# check for disallowed characters (e.g. the ';' character is disallowed
# within the cookie value attribute) and will return false (0) without
# setting the cookie if such characters are found. This function must be
# called on the IO thread.
# :delete_cookies ::
- # (FFI::Pointer(*)) Delete all cookies that match the specified parameters. If both |url| and
+ # (FFI::Pointer(*FunctionProto)) Delete all cookies that match the specified parameters. If both |url| and
# values |cookie_name| are specified all host and domain cookies matching
# both will be deleted. If only |url| is specified all host cookies (but not
# domain cookies) irrespective of path will be deleted. If |url| is NULL all
@@ -57,7 +59,7 @@ class CookieVisitor < FFI::Struct
# non- NULL invalid URL is specified or if cookies cannot be accessed. This
# function must be called on the IO thread.
# :set_storage_path ::
- # (FFI::Pointer(*)) Sets the directory path that will be used for storing cookie data. If
+ # (FFI::Pointer(*FunctionProto)) Sets the directory path that will be used for storing cookie data. If
# |path| is NULL data will be stored in memory only. Returns false (0) if
# cookies cannot be accessed.
class CookieManager < FFI::Struct
@@ -69,32 +71,30 @@ class CookieManager < FFI::Struct
:delete_cookies, :pointer,
:set_storage_path, :pointer
end
-
+
# Returns the global cookie manager. By default data will be stored at
# CefSettings.cache_path if specified or in memory otherwise.
- #
+
# @method cookie_manager_get_global_manager()
- # @return [CookieManager]
+ # @return [CookieManager]
# @scope class
attach_function :cookie_manager_get_global_manager, :cef_cookie_manager_get_global_manager, [], CookieManager
-
# Creates a new cookie manager. If |path| is NULL data will be stored in memory
# only. Returns NULL if creation fails.
- #
+
# @method cookie_manager_create_manager(path)
- # @param [FFI::Pointer(*String)] path
- # @return [CookieManager]
+ # @param [FFI::Pointer(*String)] path
+ # @return [CookieManager]
# @scope class
attach_function :cookie_manager_create_manager, :cef_cookie_manager_create_manager, [:pointer], CookieManager
-
# Structure to implement for visiting cookie values. The functions of this
# structure will always be called on the IO thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :visit ::
- # (FFI::Pointer(*)) Method that will be called once for each cookie. |count| is the 0-based
+ # (FFI::Pointer(*FunctionProto)) Method that will be called once for each cookie. |count| is the 0-based
# index for the current cookie. |total| is the total number of cookies. Set
# |deleteCookie| to true (1) to delete the cookie currently being visited.
# Return false (0) to stop visiting cookies. This function may never be
@@ -103,5 +103,5 @@ class CookieVisitor < FFI::Struct
layout :base, :char,
:visit, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_display_handler_capi.rb b/test/output/include/capi/cef_display_handler_capi.rb
index 7f7d6fb..fe32246 100644
--- a/test/output/include/capi/cef_display_handler_capi.rb
+++ b/test/output/include/capi/cef_display_handler_capi.rb
@@ -1,76 +1,78 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle events related to browser display state.
# The functions of this structure will be called on the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_loading_state_change ::
- # (FFI::Pointer(*)) Called when the loading state has changed.
+ # (FFI::Pointer(*FunctionProto)) Called when the loading state has changed.
# :on_address_change ::
- # (FFI::Pointer(*)) Called when a frame's address has changed.
+ # (FFI::Pointer(*FunctionProto)) Called when a frame's address has changed.
# :on_title_change ::
- # (FFI::Pointer(*)) Called when the page title changes.
+ # (FFI::Pointer(*FunctionProto)) Called when the page title changes.
# :on_tooltip ::
- # (FFI::Pointer(*)) Called when the browser is about to display a tooltip. |text| contains the
+ # (FFI::Pointer(*FunctionProto)) Called when the browser is about to display a tooltip. |text| contains the
# text that will be displayed in the tooltip. To handle the display of the
# tooltip yourself return true (1). Otherwise, you can optionally modify
# |text| and then return false (0) to allow the browser to display the
# tooltip.
# :on_status_message ::
- # (FFI::Pointer(*)) Called when the browser receives a status message. |text| contains the text
+ # (FFI::Pointer(*FunctionProto)) Called when the browser receives a status message. |text| contains the text
# that will be displayed in the status message and |type| indicates the
# status message type.
# :on_console_message ::
- # (FFI::Pointer(*)) Called to display a console message. Return true (1) to stop the message
+ # (FFI::Pointer(*FunctionProto)) Called to display a console message. Return true (1) to stop the message
# from being output to the console.
class DisplayHandler < FFI::Struct
layout :base, :char,
@@ -81,5 +83,5 @@ class DisplayHandler < FFI::Struct
:on_status_message, :pointer,
:on_console_message, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_dom_capi.rb b/test/output/include/capi/cef_dom_capi.rb
index 00e9ae8..aebf4ff 100644
--- a/test/output/include/capi/cef_dom_capi.rb
+++ b/test/output/include/capi/cef_dom_capi.rb
@@ -1,30 +1,32 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Domdocument < FFI::Struct
layout :dummy, :char
end
-
+
# Structure to implement for visiting the DOM. The functions of this structure
# will be called on the render process main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :visit ::
- # (FFI::Pointer(*)) Method executed for visiting the DOM. The document object passed to this
+ # (FFI::Pointer(*FunctionProto)) Method executed for visiting the DOM. The document object passed to this
# function represents a snapshot of the DOM at the time this function is
# executed. DOM objects are only valid for the scope of this function. Do not
# keep references to or attempt to access any DOM objects outside the scope
@@ -33,45 +35,45 @@ class Domvisitor < FFI::Struct
layout :base, :char,
:visit, :pointer
end
-
+
# Structure used to represent a DOM document. The functions of this structure
# should only be called on the render process main thread thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_type ::
- # (FFI::Pointer(*)) Returns the document type.
+ # (FFI::Pointer(*FunctionProto)) Returns the document type.
# :get_document ::
- # (FFI::Pointer(*)) Returns the root document node.
+ # (FFI::Pointer(*FunctionProto)) Returns the root document node.
# :get_body ::
- # (FFI::Pointer(*)) Returns the BODY node of an HTML document.
+ # (FFI::Pointer(*FunctionProto)) Returns the BODY node of an HTML document.
# :get_head ::
- # (FFI::Pointer(*)) Returns the HEAD node of an HTML document.
+ # (FFI::Pointer(*FunctionProto)) Returns the HEAD node of an HTML document.
# :get_title ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_element_by_id ::
- # (FFI::Pointer(*)) Returns the document element with the specified ID value.
+ # (FFI::Pointer(*FunctionProto)) Returns the document element with the specified ID value.
# :get_focused_node ::
- # (FFI::Pointer(*)) Returns the node that currently has keyboard focus.
+ # (FFI::Pointer(*FunctionProto)) Returns the node that currently has keyboard focus.
# :has_selection ::
- # (FFI::Pointer(*)) Returns true (1) if a portion of the document is selected.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if a portion of the document is selected.
# :get_selection_start_node ::
- # (FFI::Pointer(*)) Returns the selection start node.
+ # (FFI::Pointer(*FunctionProto)) Returns the selection start node.
# :get_selection_start_offset ::
- # (FFI::Pointer(*)) Returns the selection offset within the start node.
+ # (FFI::Pointer(*FunctionProto)) Returns the selection offset within the start node.
# :get_selection_end_node ::
- # (FFI::Pointer(*)) Returns the selection end node.
+ # (FFI::Pointer(*FunctionProto)) Returns the selection end node.
# :get_selection_end_offset ::
- # (FFI::Pointer(*)) Returns the selection offset within the end node.
+ # (FFI::Pointer(*FunctionProto)) Returns the selection offset within the end node.
# :get_selection_as_markup ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_selection_as_text ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_base_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_complete_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
class Domdocument < FFI::Struct
layout :base, :char,
:get_type, :pointer,
@@ -91,57 +93,57 @@ class Domdocument < FFI::Struct
:get_base_url, :pointer,
:get_complete_url, :pointer
end
-
+
# (Not documented)
class DomeventListener < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to represent a DOM node. The functions of this structure
# should only be called on the render process main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_type ::
- # (FFI::Pointer(*)) Returns the type for this node.
+ # (FFI::Pointer(*FunctionProto)) Returns the type for this node.
# :is_text ::
- # (FFI::Pointer(*)) Returns true (1) if this is a text node.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is a text node.
# :is_element ::
- # (FFI::Pointer(*)) Returns true (1) if this is an element node.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is an element node.
# :is_editable ::
- # (FFI::Pointer(*)) Returns true (1) if this is an editable node.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is an editable node.
# :is_form_control_element ::
- # (FFI::Pointer(*)) Returns true (1) if this is a form control element node.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is a form control element node.
# :get_form_control_element_type ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :is_same ::
- # (FFI::Pointer(*)) Returns true (1) if this object is pointing to the same handle as |that|
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is pointing to the same handle as |that|
# object.
# :get_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_value ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :set_value ::
- # (FFI::Pointer(*)) Set the value of this node. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Set the value of this node. Returns true (1) on success.
# :get_as_markup ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_document ::
- # (FFI::Pointer(*)) Returns the document associated with this node.
+ # (FFI::Pointer(*FunctionProto)) Returns the document associated with this node.
# :get_parent ::
- # (FFI::Pointer(*)) Returns the parent node.
+ # (FFI::Pointer(*FunctionProto)) Returns the parent node.
# :get_previous_sibling ::
- # (FFI::Pointer(*)) Returns the previous sibling node.
+ # (FFI::Pointer(*FunctionProto)) Returns the previous sibling node.
# :get_next_sibling ::
- # (FFI::Pointer(*)) Returns the next sibling node.
+ # (FFI::Pointer(*FunctionProto)) Returns the next sibling node.
# :has_children ::
- # (FFI::Pointer(*)) Returns true (1) if this node has child nodes.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this node has child nodes.
# :get_first_child ::
- # (FFI::Pointer(*)) Return the first child node.
+ # (FFI::Pointer(*FunctionProto)) Return the first child node.
# :get_last_child ::
- # (FFI::Pointer(*)) Returns the last child node.
+ # (FFI::Pointer(*FunctionProto)) Returns the last child node.
# :add_event_listener ::
- # (FFI::Pointer(*)) Add an event listener to this node for the specified event type. If
+ # (FFI::Pointer(*FunctionProto)) Add an event listener to this node for the specified event type. If
# |useCapture| is true (1) then this listener will be considered a capturing
# listener. Capturing listeners will recieve all events of the specified type
# before the events are dispatched to any other event targets beneath the
@@ -150,20 +152,20 @@ class DomeventListener < FFI::Struct
# can be used to register the same listener with and without capture. See
# WebCore/dom/EventNames.h for the list of supported event types.
# :get_element_tag_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :has_element_attributes ::
- # (FFI::Pointer(*)) Returns true (1) if this element has attributes.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this element has attributes.
# :has_element_attribute ::
- # (FFI::Pointer(*)) Returns true (1) if this element has an attribute named |attrName|.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this element has an attribute named |attrName|.
# :get_element_attribute ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_element_attributes ::
- # (FFI::Pointer(*)) Returns a map of all element attributes.
+ # (FFI::Pointer(*FunctionProto)) Returns a map of all element attributes.
# :set_element_attribute ::
- # (FFI::Pointer(*)) Set the value for the element attribute named |attrName|. Returns true (1)
+ # (FFI::Pointer(*FunctionProto)) Set the value for the element attribute named |attrName|. Returns true (1)
# on success.
# :get_element_inner_text ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
class Domnode < FFI::Struct
layout :base, :char,
:get_type, :pointer,
@@ -193,29 +195,29 @@ class Domnode < FFI::Struct
:set_element_attribute, :pointer,
:get_element_inner_text, :pointer
end
-
+
# Structure used to represent a DOM event. The functions of this structure
# should only be called on the render process main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_type ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_category ::
- # (FFI::Pointer(*)) Returns the event category.
+ # (FFI::Pointer(*FunctionProto)) Returns the event category.
# :get_phase ::
- # (FFI::Pointer(*)) Returns the event processing phase.
+ # (FFI::Pointer(*FunctionProto)) Returns the event processing phase.
# :can_bubble ::
- # (FFI::Pointer(*)) Returns true (1) if the event can bubble up the tree.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the event can bubble up the tree.
# :can_cancel ::
- # (FFI::Pointer(*)) Returns true (1) if the event can be canceled.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the event can be canceled.
# :get_document ::
- # (FFI::Pointer(*)) Returns the document associated with this event.
+ # (FFI::Pointer(*FunctionProto)) Returns the document associated with this event.
# :get_target ::
- # (FFI::Pointer(*)) Returns the target of the event.
+ # (FFI::Pointer(*FunctionProto)) Returns the target of the event.
# :get_current_target ::
- # (FFI::Pointer(*)) Returns the current target of the event.
+ # (FFI::Pointer(*FunctionProto)) Returns the current target of the event.
class Domevent < FFI::Struct
layout :base, :char,
:get_type, :pointer,
@@ -227,15 +229,15 @@ class Domevent < FFI::Struct
:get_target, :pointer,
:get_current_target, :pointer
end
-
+
# Structure to implement for handling DOM events. The functions of this
# structure will be called on the render process main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :handle_event ::
- # (FFI::Pointer(*)) Called when an event is received. The event object passed to this function
+ # (FFI::Pointer(*FunctionProto)) Called when an event is received. The event object passed to this function
# contains a snapshot of the DOM at the time this function is executed. DOM
# objects are only valid for the scope of this function. Do not keep
# references to or attempt to access any DOM objects outside the scope of
@@ -244,5 +246,5 @@ class DomeventListener < FFI::Struct
layout :base, :char,
:handle_event, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_focus_handler_capi.rb b/test/output/include/capi/cef_focus_handler_capi.rb
index 13f6e43..7358234 100644
--- a/test/output/include/capi/cef_focus_handler_capi.rb
+++ b/test/output/include/capi/cef_focus_handler_capi.rb
@@ -1,54 +1,56 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle events related to focus. The functions of
# this structure will be called on the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_take_focus ::
- # (FFI::Pointer(*)) Called when the browser component is about to loose focus. For instance, if
+ # (FFI::Pointer(*FunctionProto)) Called when the browser component is about to loose focus. For instance, if
# focus was on the last HTML element and the user pressed the TAB key. |next|
# will be true (1) if the browser is giving focus to the next component and
# false (0) if the browser is giving focus to the previous component.
# :on_set_focus ::
- # (FFI::Pointer(*)) Called when the browser component is requesting focus. |source| indicates
+ # (FFI::Pointer(*FunctionProto)) Called when the browser component is requesting focus. |source| indicates
# where the focus request is originating from. Return false (0) to allow the
# focus to be set or true (1) to cancel setting the focus.
# :on_got_focus ::
- # (FFI::Pointer(*)) Called when the browser component has received focus.
+ # (FFI::Pointer(*FunctionProto)) Called when the browser component has received focus.
class FocusHandler < FFI::Struct
layout :base, :char,
:on_take_focus, :pointer,
:on_set_focus, :pointer,
:on_got_focus, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_frame_capi.rb b/test/output/include/capi/cef_frame_capi.rb
index 7ff0bc8..af0bf41 100644
--- a/test/output/include/capi/cef_frame_capi.rb
+++ b/test/output/include/capi/cef_frame_capi.rb
@@ -1,113 +1,115 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class StringVisitor < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class StringVisitor < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Request < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class V8context < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Domvisitor < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to represent a frame in the browser window. When used in the
# browser process the functions of this structure may be called on any thread
# unless otherwise indicated in the comments. When used in the render process
# the functions of this structure may only be called on the main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_valid ::
- # (FFI::Pointer(*)) True if this object is currently attached to a valid frame.
+ # (FFI::Pointer(*FunctionProto)) True if this object is currently attached to a valid frame.
# :undo ::
- # (FFI::Pointer(*)) Execute undo in this frame.
+ # (FFI::Pointer(*FunctionProto)) Execute undo in this frame.
# :redo_ ::
- # (FFI::Pointer(*)) Execute redo in this frame.
+ # (FFI::Pointer(*FunctionProto)) Execute redo in this frame.
# :cut ::
- # (FFI::Pointer(*)) Execute cut in this frame.
+ # (FFI::Pointer(*FunctionProto)) Execute cut in this frame.
# :copy ::
- # (FFI::Pointer(*)) Execute copy in this frame.
+ # (FFI::Pointer(*FunctionProto)) Execute copy in this frame.
# :paste ::
- # (FFI::Pointer(*)) Execute paste in this frame.
+ # (FFI::Pointer(*FunctionProto)) Execute paste in this frame.
# :del ::
- # (FFI::Pointer(*)) Execute delete in this frame.
+ # (FFI::Pointer(*FunctionProto)) Execute delete in this frame.
# :select_all ::
- # (FFI::Pointer(*)) Execute select all in this frame.
+ # (FFI::Pointer(*FunctionProto)) Execute select all in this frame.
# :view_source ::
- # (FFI::Pointer(*)) Save this frame's HTML source to a temporary file and open it in the
+ # (FFI::Pointer(*FunctionProto)) Save this frame's HTML source to a temporary file and open it in the
# default text viewing application. This function can only be called from the
# browser process.
# :get_source ::
- # (FFI::Pointer(*)) Retrieve this frame's HTML source as a string sent to the specified
+ # (FFI::Pointer(*FunctionProto)) Retrieve this frame's HTML source as a string sent to the specified
# visitor.
# :get_text ::
- # (FFI::Pointer(*)) Retrieve this frame's display text as a string sent to the specified
+ # (FFI::Pointer(*FunctionProto)) Retrieve this frame's display text as a string sent to the specified
# visitor.
# :load_request ::
- # (FFI::Pointer(*)) Load the request represented by the |request| object.
+ # (FFI::Pointer(*FunctionProto)) Load the request represented by the |request| object.
# :load_url ::
- # (FFI::Pointer(*)) Load the specified |url|.
+ # (FFI::Pointer(*FunctionProto)) Load the specified |url|.
# :load_string ::
- # (FFI::Pointer(*)) Load the contents of |string_val| with the optional dummy target |url|.
+ # (FFI::Pointer(*FunctionProto)) Load the contents of |string_val| with the optional dummy target |url|.
# :execute_java_script ::
- # (FFI::Pointer(*)) Execute a string of JavaScript code in this frame. The |script_url|
+ # (FFI::Pointer(*FunctionProto)) Execute a string of JavaScript code in this frame. The |script_url|
# parameter is the URL where the script in question can be found, if any. The
# renderer may request this URL to show the developer the source of the
# error. The |start_line| parameter is the base line number to use for error
# reporting.
# :is_main ::
- # (FFI::Pointer(*)) Returns true (1) if this is the main (top-level) frame.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is the main (top-level) frame.
# :is_focused ::
- # (FFI::Pointer(*)) Returns true (1) if this is the focused frame.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is the focused frame.
# :get_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_identifier ::
- # (FFI::Pointer(*)) Returns the globally unique identifier for this frame.
+ # (FFI::Pointer(*FunctionProto)) Returns the globally unique identifier for this frame.
# :get_parent ::
- # (FFI::Pointer(*)) Returns the parent of this frame or NULL if this is the main (top-level)
+ # (FFI::Pointer(*FunctionProto)) Returns the parent of this frame or NULL if this is the main (top-level)
# frame.
# :get_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_browser ::
- # (FFI::Pointer(*)) Returns the browser that this frame belongs to.
+ # (FFI::Pointer(*FunctionProto)) Returns the browser that this frame belongs to.
# :get_v8context ::
- # (FFI::Pointer(*)) Get the V8 context associated with the frame. This function can only be
+ # (FFI::Pointer(*FunctionProto)) Get the V8 context associated with the frame. This function can only be
# called from the render process.
# :visit_dom ::
- # (FFI::Pointer(*)) Visit the DOM document. This function can only be called from the render
+ # (FFI::Pointer(*FunctionProto)) Visit the DOM document. This function can only be called from the render
# process.
class Frame < FFI::Struct
layout :base, :char,
@@ -136,5 +138,5 @@ class Frame < FFI::Struct
:get_v8context, :pointer,
:visit_dom, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_geolocation_handler_capi.rb b/test/output/include/capi/cef_geolocation_handler_capi.rb
index 7d6ccdf..924281f 100644
--- a/test/output/include/capi/cef_geolocation_handler_capi.rb
+++ b/test/output/include/capi/cef_geolocation_handler_capi.rb
@@ -1,55 +1,57 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Callback structure used for asynchronous continuation of geolocation
# permission requests.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :cont ::
- # (FFI::Pointer(*)) Call to allow or deny geolocation access.
+ # (FFI::Pointer(*FunctionProto)) Call to allow or deny geolocation access.
class GeolocationCallback < FFI::Struct
layout :base, :char,
:cont, :pointer
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle events related to geolocation permission
# requests. The functions of this structure will be called on the browser
# process IO thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_request_geolocation_permission ::
- # (FFI::Pointer(*)) Called when a page requests permission to access geolocation information.
+ # (FFI::Pointer(*FunctionProto)) Called when a page requests permission to access geolocation information.
# |requesting_url| is the URL requesting permission and |request_id| is the
# unique ID for the permission request. Call
# cef_geolocation_callback_t::Continue to allow or deny the permission
# request.
# :on_cancel_geolocation_permission ::
- # (FFI::Pointer(*)) Called when a geolocation access request is canceled. |requesting_url| is
+ # (FFI::Pointer(*FunctionProto)) Called when a geolocation access request is canceled. |requesting_url| is
# the URL that originally requested permission and |request_id| is the unique
# ID for the permission request.
class GeolocationHandler < FFI::Struct
@@ -57,5 +59,5 @@ class GeolocationHandler < FFI::Struct
:on_request_geolocation_permission, :pointer,
:on_cancel_geolocation_permission, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_jsdialog_handler_capi.rb b/test/output/include/capi/cef_jsdialog_handler_capi.rb
index f427e9a..b08a130 100644
--- a/test/output/include/capi/cef_jsdialog_handler_capi.rb
+++ b/test/output/include/capi/cef_jsdialog_handler_capi.rb
@@ -1,54 +1,56 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Callback structure used for asynchronous continuation of JavaScript dialog
# requests.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :cont ::
- # (FFI::Pointer(*)) Continue the JS dialog request. Set |success| to true (1) if the OK button
+ # (FFI::Pointer(*FunctionProto)) Continue the JS dialog request. Set |success| to true (1) if the OK button
# was pressed. The |user_input| value should be specified for prompt dialogs.
class JsdialogCallback < FFI::Struct
layout :base, :char,
:cont, :pointer
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle events related to JavaScript dialogs. The
# functions of this structure will be called on the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_jsdialog ::
- # (FFI::Pointer(*)) Called to run a JavaScript dialog. The |default_prompt_text| value will be
+ # (FFI::Pointer(*FunctionProto)) Called to run a JavaScript dialog. The |default_prompt_text| value will be
# specified for prompt dialogs only. Set |suppress_message| to true (1) and
# return false (0) to suppress the message (suppressing messages is
# preferable to immediately executing the callback as this is used to detect
@@ -62,14 +64,14 @@ class Browser < FFI::Struct
# the application must execute |callback| once the custom dialog is
# dismissed.
# :on_before_unload_dialog ::
- # (FFI::Pointer(*)) Called to run a dialog asking the user if they want to leave a page. Return
+ # (FFI::Pointer(*FunctionProto)) Called to run a dialog asking the user if they want to leave a page. Return
# false (0) to use the default dialog implementation. Return true (1) if the
# application will use a custom dialog or if the callback has been executed
# immediately. Custom dialogs may be either modal or modeless. If a custom
# dialog is used the application must execute |callback| once the custom
# dialog is dismissed.
# :on_reset_dialog_state ::
- # (FFI::Pointer(*)) Called to cancel any pending dialogs and reset any saved dialog state. Will
+ # (FFI::Pointer(*FunctionProto)) Called to cancel any pending dialogs and reset any saved dialog state. Will
# be called due to events like page navigation irregardless of whether any
# dialogs are currently pending.
class JsdialogHandler < FFI::Struct
@@ -78,5 +80,5 @@ class JsdialogHandler < FFI::Struct
:on_before_unload_dialog, :pointer,
:on_reset_dialog_state, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_keyboard_handler_capi.rb b/test/output/include/capi/cef_keyboard_handler_capi.rb
index 2c37192..f96a287 100644
--- a/test/output/include/capi/cef_keyboard_handler_capi.rb
+++ b/test/output/include/capi/cef_keyboard_handler_capi.rb
@@ -1,37 +1,39 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle events related to keyboard input. The
# functions of this structure will be called on the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_pre_key_event ::
- # (FFI::Pointer(*)) shortcut set |is_keyboard_shortcut| to true (1) and return false (0).
+ # (FFI::Pointer(*FunctionProto)) shortcut set |is_keyboard_shortcut| to true (1) and return false (0).
# :on_key_event ::
- # (FFI::Pointer(*)) Called after the renderer and JavaScript in the page has had a chance to
+ # (FFI::Pointer(*FunctionProto)) Called after the renderer and JavaScript in the page has had a chance to
# handle the event. |event| contains information about the keyboard event.
# |os_event| is the operating system event message, if any. Return true (1)
# if the keyboard event was handled or false (0) otherwise.
@@ -40,5 +42,5 @@ class KeyboardHandler < FFI::Struct
:on_pre_key_event, :pointer,
:on_key_event, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_life_span_handler_capi.rb b/test/output/include/capi/cef_life_span_handler_capi.rb
index badb5af..1325f38 100644
--- a/test/output/include/capi/cef_life_span_handler_capi.rb
+++ b/test/output/include/capi/cef_life_span_handler_capi.rb
@@ -1,55 +1,57 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Client < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle events related to browser life span. The
# functions of this structure will be called on the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_before_popup ::
- # (FFI::Pointer(*)) Called before a new popup window is created. The |parentBrowser| parameter
+ # (FFI::Pointer(*FunctionProto)) Called before a new popup window is created. The |parentBrowser| parameter
# will point to the parent browser window. The |popupFeatures| parameter will
# contain information about the style of popup window requested. Return false
# (0) to have the framework create the new popup window based on the
@@ -59,19 +61,19 @@ class Browser < FFI::Struct
# modify the object that |client| points to. To change the settings for the
# new window modify the |settings| structure.
# :on_after_created ::
- # (FFI::Pointer(*)) Called after a new window is created.
+ # (FFI::Pointer(*FunctionProto)) Called after a new window is created.
# :run_modal ::
- # (FFI::Pointer(*)) Called when a modal window is about to display and the modal loop should
+ # (FFI::Pointer(*FunctionProto)) Called when a modal window is about to display and the modal loop should
# begin running. Return false (0) to use the default modal loop
# implementation or true (1) to use a custom implementation.
# :do_close ::
- # (FFI::Pointer(*)) Called when a window has recieved a request to close. Return false (0) to
+ # (FFI::Pointer(*FunctionProto)) Called when a window has recieved a request to close. Return false (0) to
# proceed with the window close or true (1) to cancel the window close. If
# this is a modal window and a custom modal loop implementation was provided
# in run_modal() this callback should be used to restore the opener window to
# a usable state.
# :on_before_close ::
- # (FFI::Pointer(*)) Called just before a window is closed. If this is a modal window and a
+ # (FFI::Pointer(*FunctionProto)) Called just before a window is closed. If this is a modal window and a
# custom modal loop implementation was provided in run_modal() this callback
# should be used to exit the custom modal loop.
class LifeSpanHandler < FFI::Struct
@@ -82,5 +84,5 @@ class LifeSpanHandler < FFI::Struct
:do_close, :pointer,
:on_before_close, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_load_handler_capi.rb b/test/output/include/capi/cef_load_handler_capi.rb
index c32afff..7207380 100644
--- a/test/output/include/capi/cef_load_handler_capi.rb
+++ b/test/output/include/capi/cef_load_handler_capi.rb
@@ -1,69 +1,71 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle events related to browser load status. The
# functions of this structure will be called on the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_load_start ::
- # (FFI::Pointer(*)) Called when the browser begins loading a frame. The |frame| value will
+ # (FFI::Pointer(*FunctionProto)) Called when the browser begins loading a frame. The |frame| value will
# never be NULL -- call the is_main() function to check if this frame is the
# main frame. Multiple frames may be loading at the same time. Sub-frames may
# start or continue loading after the main frame load has ended. This
# function may not be called for a particular frame if the load request for
# that frame fails.
# :on_load_end ::
- # (FFI::Pointer(*)) Called when the browser is done loading a frame. The |frame| value will
+ # (FFI::Pointer(*FunctionProto)) Called when the browser is done loading a frame. The |frame| value will
# never be NULL -- call the is_main() function to check if this frame is the
# main frame. Multiple frames may be loading at the same time. Sub-frames may
# start or continue loading after the main frame load has ended. This
# function will always be called for all frames irrespective of whether the
# request completes successfully.
# :on_load_error ::
- # (FFI::Pointer(*)) Called when the browser fails to load a resource. |errorCode| is the error
+ # (FFI::Pointer(*FunctionProto)) Called when the browser fails to load a resource. |errorCode| is the error
# code number, |errorText| is the error text and and |failedUrl| is the URL
# that failed to load. See net\base\net_error_list.h for complete
# descriptions of the error codes.
@@ -73,5 +75,5 @@ class LoadHandler < FFI::Struct
:on_load_end, :pointer,
:on_load_error, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_menu_model_capi.rb b/test/output/include/capi/cef_menu_model_capi.rb
index 843a14a..df23fc0 100644
--- a/test/output/include/capi/cef_menu_model_capi.rb
+++ b/test/output/include/capi/cef_menu_model_capi.rb
@@ -1,149 +1,151 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Supports creation and modification of menus. See cef_menu_id_t for the
# command ids that have default implementations. All user-defined command ids
# should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of
# this structure can only be accessed on the browser process the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :clear ::
- # (FFI::Pointer(*)) Clears the menu. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Clears the menu. Returns true (1) on success.
# :get_count ::
- # (FFI::Pointer(*)) Returns the number of items in this menu.
+ # (FFI::Pointer(*FunctionProto)) Returns the number of items in this menu.
# :add_separator ::
- # (FFI::Pointer(*)) Add a separator to the menu. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Add a separator to the menu. Returns true (1) on success.
# :add_item ::
- # (FFI::Pointer(*)) Add an item to the menu. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Add an item to the menu. Returns true (1) on success.
# :add_check_item ::
- # (FFI::Pointer(*)) Add a check item to the menu. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Add a check item to the menu. Returns true (1) on success.
# :add_radio_item ::
- # (FFI::Pointer(*)) Add a radio item to the menu. Only a single item with the specified
+ # (FFI::Pointer(*FunctionProto)) Add a radio item to the menu. Only a single item with the specified
# |group_id| can be checked at a time. Returns true (1) on success.
# :add_sub_menu ::
- # (FFI::Pointer(*)) Add a sub-menu to the menu. The new sub-menu is returned.
+ # (FFI::Pointer(*FunctionProto)) Add a sub-menu to the menu. The new sub-menu is returned.
# :insert_separator_at ::
- # (FFI::Pointer(*)) Insert a separator in the menu at the specified |index|. Returns true (1)
+ # (FFI::Pointer(*FunctionProto)) Insert a separator in the menu at the specified |index|. Returns true (1)
# on success.
# :insert_item_at ::
- # (FFI::Pointer(*)) Insert an item in the menu at the specified |index|. Returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Insert an item in the menu at the specified |index|. Returns true (1) on
# success.
# :insert_check_item_at ::
- # (FFI::Pointer(*)) Insert a check item in the menu at the specified |index|. Returns true (1)
+ # (FFI::Pointer(*FunctionProto)) Insert a check item in the menu at the specified |index|. Returns true (1)
# on success.
# :insert_radio_item_at ::
- # (FFI::Pointer(*)) Insert a radio item in the menu at the specified |index|. Only a single
+ # (FFI::Pointer(*FunctionProto)) Insert a radio item in the menu at the specified |index|. Only a single
# item with the specified |group_id| can be checked at a time. Returns true
# (1) on success.
# :insert_sub_menu_at ::
- # (FFI::Pointer(*)) Insert a sub-menu in the menu at the specified |index|. The new sub-menu is
+ # (FFI::Pointer(*FunctionProto)) Insert a sub-menu in the menu at the specified |index|. The new sub-menu is
# returned.
# :remove ::
- # (FFI::Pointer(*)) Removes the item with the specified |command_id|. Returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Removes the item with the specified |command_id|. Returns true (1) on
# success.
# :remove_at ::
- # (FFI::Pointer(*)) Removes the item at the specified |index|. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Removes the item at the specified |index|. Returns true (1) on success.
# :get_index_of ::
- # (FFI::Pointer(*)) Returns the index associated with the specified |command_id| or -1 if not
+ # (FFI::Pointer(*FunctionProto)) Returns the index associated with the specified |command_id| or -1 if not
# found due to the command id not existing in the menu.
# :get_command_id_at ::
- # (FFI::Pointer(*)) Returns the command id at the specified |index| or -1 if not found due to
+ # (FFI::Pointer(*FunctionProto)) Returns the command id at the specified |index| or -1 if not found due to
# invalid range or the index being a separator.
# :set_command_id_at ::
- # (FFI::Pointer(*)) Sets the command id at the specified |index|. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Sets the command id at the specified |index|. Returns true (1) on success.
# :get_label ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_label_at ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :set_label ::
- # (FFI::Pointer(*)) Sets the label for the specified |command_id|. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Sets the label for the specified |command_id|. Returns true (1) on success.
# :set_label_at ::
- # (FFI::Pointer(*)) Set the label at the specified |index|. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Set the label at the specified |index|. Returns true (1) on success.
# :get_type ::
- # (FFI::Pointer(*)) Returns the item type for the specified |command_id|.
+ # (FFI::Pointer(*FunctionProto)) Returns the item type for the specified |command_id|.
# :get_type_at ::
- # (FFI::Pointer(*)) Returns the item type at the specified |index|.
+ # (FFI::Pointer(*FunctionProto)) Returns the item type at the specified |index|.
# :get_group_id ::
- # (FFI::Pointer(*)) Returns the group id for the specified |command_id| or -1 if invalid.
+ # (FFI::Pointer(*FunctionProto)) Returns the group id for the specified |command_id| or -1 if invalid.
# :get_group_id_at ::
- # (FFI::Pointer(*)) Returns the group id at the specified |index| or -1 if invalid.
+ # (FFI::Pointer(*FunctionProto)) Returns the group id at the specified |index| or -1 if invalid.
# :set_group_id ::
- # (FFI::Pointer(*)) Sets the group id for the specified |command_id|. Returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Sets the group id for the specified |command_id|. Returns true (1) on
# success.
# :set_group_id_at ::
- # (FFI::Pointer(*)) Sets the group id at the specified |index|. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Sets the group id at the specified |index|. Returns true (1) on success.
# :get_sub_menu ::
- # (FFI::Pointer(*)) Returns the submenu for the specified |command_id| or NULL if invalid.
+ # (FFI::Pointer(*FunctionProto)) Returns the submenu for the specified |command_id| or NULL if invalid.
# :get_sub_menu_at ::
- # (FFI::Pointer(*)) Returns the submenu at the specified |index| or NULL if invalid.
+ # (FFI::Pointer(*FunctionProto)) Returns the submenu at the specified |index| or NULL if invalid.
# :is_visible ::
- # (FFI::Pointer(*)) Returns true (1) if the specified |command_id| is visible.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |command_id| is visible.
# :is_visible_at ::
- # (FFI::Pointer(*)) Returns true (1) if the specified |index| is visible.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |index| is visible.
# :set_visible ::
- # (FFI::Pointer(*)) Change the visibility of the specified |command_id|. Returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Change the visibility of the specified |command_id|. Returns true (1) on
# success.
# :set_visible_at ::
- # (FFI::Pointer(*)) Change the visibility at the specified |index|. Returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Change the visibility at the specified |index|. Returns true (1) on
# success.
# :is_enabled ::
- # (FFI::Pointer(*)) Returns true (1) if the specified |command_id| is enabled.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |command_id| is enabled.
# :is_enabled_at ::
- # (FFI::Pointer(*)) Returns true (1) if the specified |index| is enabled.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |index| is enabled.
# :set_enabled ::
- # (FFI::Pointer(*)) Change the enabled status of the specified |command_id|. Returns true (1)
+ # (FFI::Pointer(*FunctionProto)) Change the enabled status of the specified |command_id|. Returns true (1)
# on success.
# :set_enabled_at ::
- # (FFI::Pointer(*)) Change the enabled status at the specified |index|. Returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Change the enabled status at the specified |index|. Returns true (1) on
# success.
# :is_checked ::
- # (FFI::Pointer(*)) Returns true (1) if the specified |command_id| is checked. Only applies to
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |command_id| is checked. Only applies to
# check and radio items.
# :is_checked_at ::
- # (FFI::Pointer(*)) Returns true (1) if the specified |index| is checked. Only applies to check
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |index| is checked. Only applies to check
# and radio items.
# :set_checked ::
- # (FFI::Pointer(*)) Check the specified |command_id|. Only applies to check and radio items.
+ # (FFI::Pointer(*FunctionProto)) Check the specified |command_id|. Only applies to check and radio items.
# Returns true (1) on success.
# :set_checked_at ::
- # (FFI::Pointer(*)) Check the specified |index|. Only applies to check and radio items. Returns
+ # (FFI::Pointer(*FunctionProto)) Check the specified |index|. Only applies to check and radio items. Returns
# true (1) on success.
# :has_accelerator ::
- # (FFI::Pointer(*)) Returns true (1) if the specified |command_id| has a keyboard accelerator
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |command_id| has a keyboard accelerator
# assigned.
# :has_accelerator_at ::
- # (FFI::Pointer(*)) Returns true (1) if the specified |index| has a keyboard accelerator
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |index| has a keyboard accelerator
# assigned.
# :set_accelerator ::
- # (FFI::Pointer(*)) Set the keyboard accelerator for the specified |command_id|. |key_code| can
+ # (FFI::Pointer(*FunctionProto)) Set the keyboard accelerator for the specified |command_id|. |key_code| can
# be any virtual key or character value. Returns true (1) on success.
# :set_accelerator_at ::
- # (FFI::Pointer(*)) Set the keyboard accelerator at the specified |index|. |key_code| can be
+ # (FFI::Pointer(*FunctionProto)) Set the keyboard accelerator at the specified |index|. |key_code| can be
# any virtual key or character value. Returns true (1) on success.
# :remove_accelerator ::
- # (FFI::Pointer(*)) Remove the keyboard accelerator for the specified |command_id|. Returns
+ # (FFI::Pointer(*FunctionProto)) Remove the keyboard accelerator for the specified |command_id|. Returns
# true (1) on success.
# :remove_accelerator_at ::
- # (FFI::Pointer(*)) Remove the keyboard accelerator at the specified |index|. Returns true (1)
+ # (FFI::Pointer(*FunctionProto)) Remove the keyboard accelerator at the specified |index|. Returns true (1)
# on success.
# :get_accelerator ::
- # (FFI::Pointer(*)) Retrieves the keyboard accelerator for the specified |command_id|. Returns
+ # (FFI::Pointer(*FunctionProto)) Retrieves the keyboard accelerator for the specified |command_id|. Returns
# true (1) on success.
# :get_accelerator_at ::
- # (FFI::Pointer(*)) Retrieves the keyboard accelerator for the specified |index|. Returns true
+ # (FFI::Pointer(*FunctionProto)) Retrieves the keyboard accelerator for the specified |index|. Returns true
# (1) on success.
class MenuModel < FFI::Struct
layout :base, :char,
@@ -197,5 +199,5 @@ class MenuModel < FFI::Struct
:get_accelerator, :pointer,
:get_accelerator_at, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_origin_whitelist_capi.rb b/test/output/include/capi/cef_origin_whitelist_capi.rb
index f03c3f1..75bf1cf 100644
--- a/test/output/include/capi/cef_origin_whitelist_capi.rb
+++ b/test/output/include/capi/cef_origin_whitelist_capi.rb
@@ -1,19 +1,21 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Add an entry to the cross-origin access whitelist.
- #
+
# The same-origin policy restricts how scripts hosted from different origins
# (scheme + domain + port) can communicate. By default, scripts can only access
# resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes
@@ -22,13 +24,13 @@ def self.attach_function(name, *_)
# XMLHttpRequest requests on http://target.example.com if the
# http://target.example.com request returns an "Access-Control-Allow-Origin:
# https://source.example.com" response header.
- #
+
# Scripts in separate frames or iframes and hosted from the same protocol and
# domain suffix can execute cross-origin JavaScript if both pages set the
# document.domain value to the same domain suffix. For example,
# scheme://foo.example.com and scheme://bar.example.com can communicate using
# JavaScript if both domains set document.domain="example.com".
- #
+
# This function is used to allow access to origins that would otherwise violate
# the same-origin policy. Scripts hosted underneath the fully qualified
# |source_origin| URL (like http://www.example.com) will be allowed access to
@@ -38,41 +40,38 @@ def self.attach_function(name, *_)
# |allow_target_subdomains| is true (1) sub-domain matches will be allowed. If
# |target_domain| is NULL and |allow_target_subdomains| if true (1) all domains
# and IP addresses will be allowed.
- #
+
# This function cannot be used to bypass the restrictions on local or display
# isolated schemes. See the comments on CefRegisterCustomScheme for more
# information.
- #
+
# This function may be called on any thread. Returns false (0) if
# |source_origin| is invalid or the whitelist cannot be accessed.
- #
+
# @method add_cross_origin_whitelist_entry(source_origin, target_protocol, target_domain, allow_target_subdomains)
- # @param [FFI::Pointer(*String)] source_origin
- # @param [FFI::Pointer(*String)] target_protocol
- # @param [FFI::Pointer(*String)] target_domain
- # @param [Integer] allow_target_subdomains
- # @return [Integer]
+ # @param [FFI::Pointer(*String)] source_origin
+ # @param [FFI::Pointer(*String)] target_protocol
+ # @param [FFI::Pointer(*String)] target_domain
+ # @param [Integer] allow_target_subdomains
+ # @return [Integer]
# @scope class
attach_function :add_cross_origin_whitelist_entry, :cef_add_cross_origin_whitelist_entry, [:pointer, :pointer, :pointer, :int], :int
-
# Remove an entry from the cross-origin access whitelist. Returns false (0) if
# |source_origin| is invalid or the whitelist cannot be accessed.
- #
+
# @method remove_cross_origin_whitelist_entry(source_origin, target_protocol, target_domain, allow_target_subdomains)
- # @param [FFI::Pointer(*String)] source_origin
- # @param [FFI::Pointer(*String)] target_protocol
- # @param [FFI::Pointer(*String)] target_domain
- # @param [Integer] allow_target_subdomains
- # @return [Integer]
+ # @param [FFI::Pointer(*String)] source_origin
+ # @param [FFI::Pointer(*String)] target_protocol
+ # @param [FFI::Pointer(*String)] target_domain
+ # @param [Integer] allow_target_subdomains
+ # @return [Integer]
# @scope class
attach_function :remove_cross_origin_whitelist_entry, :cef_remove_cross_origin_whitelist_entry, [:pointer, :pointer, :pointer, :int], :int
-
# Remove all entries from the cross-origin access whitelist. Returns false (0)
# if the whitelist cannot be accessed.
- #
+
# @method clear_cross_origin_whitelist()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :clear_cross_origin_whitelist, :cef_clear_cross_origin_whitelist, [], :int
-
end
diff --git a/test/output/include/capi/cef_process_message_capi.rb b/test/output/include/capi/cef_process_message_capi.rb
index 2958f40..8b0823e 100644
--- a/test/output/include/capi/cef_process_message_capi.rb
+++ b/test/output/include/capi/cef_process_message_capi.rb
@@ -1,39 +1,41 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class ListValue < FFI::Struct
layout :dummy, :char
end
-
+
# Structure representing a message. Can be used on any process and thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_valid ::
- # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions
# if this function returns false (0).
# :is_read_only ::
- # (FFI::Pointer(*)) Returns true (1) if the values of this object are read-only. Some APIs may
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the values of this object are read-only. Some APIs may
# expose read-only objects.
# :copy ::
- # (FFI::Pointer(*)) Returns a writable copy of this object.
+ # (FFI::Pointer(*FunctionProto)) Returns a writable copy of this object.
# :get_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_argument_list ::
- # (FFI::Pointer(*)) Returns the list of arguments.
+ # (FFI::Pointer(*FunctionProto)) Returns the list of arguments.
class ProcessMessage < FFI::Struct
layout :base, :char,
:is_valid, :pointer,
@@ -42,13 +44,12 @@ class ProcessMessage < FFI::Struct
:get_name, :pointer,
:get_argument_list, :pointer
end
-
+
# Create a new cef_process_message_t object with the specified name.
- #
+
# @method process_message_create(name)
- # @param [FFI::Pointer(*String)] name
- # @return [ProcessMessage]
+ # @param [FFI::Pointer(*String)] name
+ # @return [ProcessMessage]
# @scope class
attach_function :process_message_create, :cef_process_message_create, [:pointer], ProcessMessage
-
end
diff --git a/test/output/include/capi/cef_proxy_handler_capi.rb b/test/output/include/capi/cef_proxy_handler_capi.rb
index 5655cc4..4f0daf7 100644
--- a/test/output/include/capi/cef_proxy_handler_capi.rb
+++ b/test/output/include/capi/cef_proxy_handler_capi.rb
@@ -1,27 +1,29 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Implement this structure to handle proxy resolution events.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_proxy_for_url ::
- # (FFI::Pointer(*)) Called to retrieve proxy information for the specified |url|.
+ # (FFI::Pointer(*FunctionProto)) Called to retrieve proxy information for the specified |url|.
class ProxyHandler < FFI::Struct
layout :base, :char,
:get_proxy_for_url, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_render_process_handler_capi.rb b/test/output/include/capi/cef_render_process_handler_capi.rb
index 930f944..3969306 100644
--- a/test/output/include/capi/cef_render_process_handler_capi.rb
+++ b/test/output/include/capi/cef_render_process_handler_capi.rb
@@ -1,112 +1,114 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class V8context < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class V8context < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Domnode < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class ProcessMessage < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to implement render process callbacks. The functions of this
# structure will always be called on the render process main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_render_thread_created ::
- # (FFI::Pointer(*)) Called after the render process main thread has been created.
+ # (FFI::Pointer(*FunctionProto)) Called after the render process main thread has been created.
# :on_web_kit_initialized ::
- # (FFI::Pointer(*)) Called after WebKit has been initialized.
+ # (FFI::Pointer(*FunctionProto)) Called after WebKit has been initialized.
# :on_browser_created ::
- # (FFI::Pointer(*)) Called after a browser has been created.
+ # (FFI::Pointer(*FunctionProto)) Called after a browser has been created.
# :on_browser_destroyed ::
- # (FFI::Pointer(*)) Called before a browser is destroyed.
+ # (FFI::Pointer(*FunctionProto)) Called before a browser is destroyed.
# :on_context_created ::
- # (FFI::Pointer(*)) Called immediately after the V8 context for a frame has been created. To
+ # (FFI::Pointer(*FunctionProto)) Called immediately after the V8 context for a frame has been created. To
# retrieve the JavaScript 'window' object use the
# cef_v8context_t::get_global() function.
# :on_context_released ::
- # (FFI::Pointer(*)) Called immediately before the V8 context for a frame is released. No
+ # (FFI::Pointer(*FunctionProto)) Called immediately before the V8 context for a frame is released. No
# references to the context should be kept after this function is called.
# :on_focused_node_changed ::
- # (FFI::Pointer(*)) Called when a new node in the the browser gets focus. The |node| value may
+ # (FFI::Pointer(*FunctionProto)) Called when a new node in the the browser gets focus. The |node| value may
# be NULL if no specific node has gained focus. The node object passed to
# this function represents a snapshot of the DOM at the time this function is
# executed. DOM objects are only valid for the scope of this function. Do not
# keep references to or attempt to access any DOM objects outside the scope
# of this function.
# :on_process_message_received ::
- # (FFI::Pointer(*)) Called when a new message is received from a different process. Return true
+ # (FFI::Pointer(*FunctionProto)) Called when a new message is received from a different process. Return true
# (1) if the message was handled or false (0) otherwise. Do not keep a
# reference to or attempt to access the message outside of this callback.
class RenderProcessHandler < FFI::Struct
@@ -120,5 +122,5 @@ class RenderProcessHandler < FFI::Struct
:on_focused_node_changed, :pointer,
:on_process_message_received, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_request_capi.rb b/test/output/include/capi/cef_request_capi.rb
index 539db5c..1023df7 100644
--- a/test/output/include/capi/cef_request_capi.rb
+++ b/test/output/include/capi/cef_request_capi.rb
@@ -1,53 +1,55 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure used to represent a web request. The functions of this structure
# may be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_read_only ::
- # (FFI::Pointer(*)) Returns true (1) if this object is read-only.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is read-only.
# :get_url ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :set_url ::
- # (FFI::Pointer(*)) Set the fully qualified URL.
+ # (FFI::Pointer(*FunctionProto)) Set the fully qualified URL.
# :get_method ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :set_method ::
- # (FFI::Pointer(*)) Set the request function type.
+ # (FFI::Pointer(*FunctionProto)) Set the request function type.
# :get_post_data ::
- # (FFI::Pointer(*)) Get the post data.
+ # (FFI::Pointer(*FunctionProto)) Get the post data.
# :set_post_data ::
- # (FFI::Pointer(*)) Set the post data.
+ # (FFI::Pointer(*FunctionProto)) Set the post data.
# :get_header_map ::
- # (FFI::Pointer(*)) Get the header values.
+ # (FFI::Pointer(*FunctionProto)) Get the header values.
# :set_header_map ::
- # (FFI::Pointer(*)) Set the header values.
+ # (FFI::Pointer(*FunctionProto)) Set the header values.
# :set ::
- # (FFI::Pointer(*)) Set all values at one time.
+ # (FFI::Pointer(*FunctionProto)) Set all values at one time.
# :get_flags ::
- # (FFI::Pointer(*)) Get the flags used in combination with cef_urlrequest_t. See
+ # (FFI::Pointer(*FunctionProto)) Get the flags used in combination with cef_urlrequest_t. See
# cef_urlrequest_flags_t for supported values.
# :set_flags ::
- # (FFI::Pointer(*)) Set the flags used in combination with cef_urlrequest_t. See
+ # (FFI::Pointer(*FunctionProto)) Set the flags used in combination with cef_urlrequest_t. See
# cef_urlrequest_flags_t for supported values.
# :get_first_party_for_cookies ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :set_first_party_for_cookies ::
- # (FFI::Pointer(*)) Get the URL to the first party for cookies used in combination with
+ # (FFI::Pointer(*FunctionProto)) Get the URL to the first party for cookies used in combination with
# cef_urlrequest_t.
class Request < FFI::Struct
layout :base, :char,
@@ -66,89 +68,84 @@ class Request < FFI::Struct
:get_first_party_for_cookies, :pointer,
:set_first_party_for_cookies, :pointer
end
-
+
# Create a new cef_request_t object.
- #
+
# @method request_create()
- # @return [Request]
+ # @return [Request]
# @scope class
attach_function :request_create, :cef_request_create, [], Request
-
# (Not documented)
class PostDataElement < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class PostDataElement < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class PostDataElement < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to represent post data for a web request. The functions of
# this structure may be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_read_only ::
- # (FFI::Pointer(*)) Returns true (1) if this object is read-only.
- # :get_element_count ::
- # (FFI::Pointer(*)) Returns the number of existing post data elements.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is read-only.
+ # :size ::
+ # (error_unknown) Returns the number of existing post data elements.
# :get_elements ::
- # (FFI::Pointer(*)) Retrieve the post data elements.
+ # (FFI::Pointer(*FunctionProto)) Retrieve the post data elements.
# :remove_element ::
- # (FFI::Pointer(*)) Remove the specified post data element. Returns true (1) if the removal
+ # (FFI::Pointer(*FunctionProto)) Remove the specified post data element. Returns true (1) if the removal
# succeeds.
# :add_element ::
- # (FFI::Pointer(*)) Add the specified post data element. Returns true (1) if the add succeeds.
+ # (FFI::Pointer(*FunctionProto)) Add the specified post data element. Returns true (1) if the add succeeds.
# :remove_elements ::
- # (FFI::Pointer(*)) Remove all existing post data elements.
+ # (FFI::Pointer(*FunctionProto)) Remove all existing post data elements.
class PostData < FFI::Struct
layout :base, :char,
:is_read_only, :pointer,
- :get_element_count, :pointer,
+ :size, :char,
:get_elements, :pointer,
:remove_element, :pointer,
:add_element, :pointer,
:remove_elements, :pointer
end
-
+
# Create a new cef_post_data_t object.
- #
+
# @method post_data_create()
- # @return [PostData]
+ # @return [PostData]
# @scope class
attach_function :post_data_create, :cef_post_data_create, [], PostData
-
# Structure used to represent a single element in the request post data. The
# functions of this structure may be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_read_only ::
- # (FFI::Pointer(*)) Returns true (1) if this object is read-only.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is read-only.
# :set_to_empty ::
- # (FFI::Pointer(*)) Remove all contents from the post data element.
+ # (FFI::Pointer(*FunctionProto)) Remove all contents from the post data element.
# :set_to_file ::
- # (FFI::Pointer(*)) The post data element will represent a file.
+ # (FFI::Pointer(*FunctionProto)) The post data element will represent a file.
# :set_to_bytes ::
- # (FFI::Pointer(*)) The post data element will represent bytes. The bytes passed in will be
+ # (FFI::Pointer(*FunctionProto)) The post data element will represent bytes. The bytes passed in will be
# copied.
# :get_type ::
- # (FFI::Pointer(*)) Return the type of this post data element.
+ # (FFI::Pointer(*FunctionProto)) Return the type of this post data element.
# :get_file ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
- # :get_bytes_count ::
- # (FFI::Pointer(*)) Return the number of bytes.
- # :get_bytes ::
- # (FFI::Pointer(*)) Read up to |size| bytes into |bytes| and return the number of bytes
- # actually read.
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
+ # :size ::
+ # (error_unknown) Return the number of bytes.
class PostDataElement < FFI::Struct
layout :base, :char,
:is_read_only, :pointer,
@@ -157,15 +154,13 @@ class PostDataElement < FFI::Struct
:set_to_bytes, :pointer,
:get_type, :pointer,
:get_file, :pointer,
- :get_bytes_count, :pointer,
- :get_bytes, :pointer
+ :size, :char
end
-
+
# Create a new cef_post_data_element_t object.
- #
+
# @method post_data_element_create()
- # @return [PostDataElement]
+ # @return [PostDataElement]
# @scope class
attach_function :post_data_element_create, :cef_post_data_element_create, [], PostDataElement
-
end
diff --git a/test/output/include/capi/cef_request_handler_capi.rb b/test/output/include/capi/cef_request_handler_capi.rb
index e4f6895..7e8c002 100644
--- a/test/output/include/capi/cef_request_handler_capi.rb
+++ b/test/output/include/capi/cef_request_handler_capi.rb
@@ -1,126 +1,128 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Callback structure used for asynchronous continuation of authentication
# requests.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :cont ::
- # (FFI::Pointer(*)) Continue the authentication request.
+ # (FFI::Pointer(*FunctionProto)) Continue the authentication request.
# :cancel ::
- # (FFI::Pointer(*)) Cancel the authentication request.
+ # (FFI::Pointer(*FunctionProto)) Cancel the authentication request.
class AuthCallback < FFI::Struct
layout :base, :char,
:cont, :pointer,
:cancel, :pointer
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Request < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class ResourceHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Request < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class CookieManager < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# Implement this structure to handle events related to browser requests. The
# functions of this structure will be called on the thread indicated.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_before_resource_load ::
- # (FFI::Pointer(*)) Called on the IO thread before a resource request is loaded. The |request|
+ # (FFI::Pointer(*FunctionProto)) Called on the IO thread before a resource request is loaded. The |request|
# object may be modified. To cancel the request return true (1) otherwise
# return false (0).
# :get_resource_handler ::
- # (FFI::Pointer(*)) Called on the IO thread before a resource is loaded. To allow the resource
+ # (FFI::Pointer(*FunctionProto)) Called on the IO thread before a resource is loaded. To allow the resource
# to load normally return NULL. To specify a handler for the resource return
# a cef_resource_handler_t object. The |request| object should not be
# modified in this callback.
# :on_resource_redirect ::
- # (FFI::Pointer(*)) Called on the IO thread when a resource load is redirected. The |old_url|
+ # (FFI::Pointer(*FunctionProto)) Called on the IO thread when a resource load is redirected. The |old_url|
# parameter will contain the old URL. The |new_url| parameter will contain
# the new URL and can be changed if desired.
# :get_auth_credentials ::
- # (FFI::Pointer(*)) Called on the IO thread when the browser needs credentials from the user.
+ # (FFI::Pointer(*FunctionProto)) Called on the IO thread when the browser needs credentials from the user.
# |isProxy| indicates whether the host is a proxy server. |host| contains the
# hostname and |port| contains the port number. Return true (1) to continue
# the request and call cef_auth_callback_t::Complete() when the
# authentication information is available. Return false (0) to cancel the
# request.
# :get_cookie_manager ::
- # (FFI::Pointer(*)) Called on the IO thread to retrieve the cookie manager. |main_url| is the
+ # (FFI::Pointer(*FunctionProto)) Called on the IO thread to retrieve the cookie manager. |main_url| is the
# URL of the top-level frame. Cookies managers can be unique per browser or
# shared across multiple browsers. The global cookie manager will be used if
# this function returns NULL.
@@ -132,5 +134,5 @@ class RequestHandler < FFI::Struct
:get_auth_credentials, :pointer,
:get_cookie_manager, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_resource_bundle_handler_capi.rb b/test/output/include/capi/cef_resource_bundle_handler_capi.rb
index 9a97472..f45a764 100644
--- a/test/output/include/capi/cef_resource_bundle_handler_capi.rb
+++ b/test/output/include/capi/cef_resource_bundle_handler_capi.rb
@@ -1,30 +1,32 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure used to implement a custom resource bundle structure. The functions
# of this structure may be called on multiple threads.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_localized_string ::
- # (FFI::Pointer(*)) Called to retrieve a localized translation for the string specified by
+ # (FFI::Pointer(*FunctionProto)) Called to retrieve a localized translation for the string specified by
# |message_id|. To provide the translation set |string| to the translation
# string and return true (1). To use the default translation return false
# (0). Supported message IDs are listed in cef_pack_strings.h.
# :get_data_resource ::
- # (FFI::Pointer(*)) Called to retrieve data for the resource specified by |resource_id|. To
+ # (FFI::Pointer(*FunctionProto)) Called to retrieve data for the resource specified by |resource_id|. To
# provide the resource data set |data| and |data_size| to the data pointer
# and size respectively and return true (1). To use the default resource data
# return false (0). The resource data will not be copied and must remain
@@ -35,5 +37,5 @@ class ResourceBundleHandler < FFI::Struct
:get_localized_string, :pointer,
:get_data_resource, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_resource_handler_capi.rb b/test/output/include/capi/cef_resource_handler_capi.rb
index f00806d..4eaf31f 100644
--- a/test/output/include/capi/cef_resource_handler_capi.rb
+++ b/test/output/include/capi/cef_resource_handler_capi.rb
@@ -1,51 +1,53 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Request < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Callback < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Response < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Callback < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to implement a custom request handler structure. The functions
# of this structure will always be called on the IO thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :process_request ::
- # (FFI::Pointer(*)) Begin processing the request. To handle the request return true (1) and
+ # (FFI::Pointer(*FunctionProto)) Begin processing the request. To handle the request return true (1) and
# call cef_callback_t::cont() once the response header information is
# available (cef_callback_t::cont() can also be called from inside this
# function if header information is available immediately). To cancel the
# request return false (0).
# :get_response_headers ::
- # (FFI::Pointer(*)) Retrieve response header information. If the response length is not known
+ # (FFI::Pointer(*FunctionProto)) Retrieve response header information. If the response length is not known
# set |response_length| to -1 and read_response() will be called until it
# returns false (0). If the response length is known set |response_length| to
# a positive value and read_response() will be called until it returns false
@@ -54,20 +56,20 @@ class Callback < FFI::Struct
# values. To redirect the request to a new URL set |redirectUrl| to the new
# URL.
# :read_response ::
- # (FFI::Pointer(*)) Read response data. If data is available immediately copy up to
+ # (FFI::Pointer(*FunctionProto)) Read response data. If data is available immediately copy up to
# |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
# bytes copied, and return true (1). To read the data at a later time set
# |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when the
# data is available. To indicate response completion return false (0).
# :can_get_cookie ::
- # (FFI::Pointer(*)) Return true (1) if the specified cookie can be sent with the request or
+ # (FFI::Pointer(*FunctionProto)) Return true (1) if the specified cookie can be sent with the request or
# false (0) otherwise. If false (0) is returned for any cookie then no
# cookies will be sent with the request.
# :can_set_cookie ::
- # (FFI::Pointer(*)) Return true (1) if the specified cookie returned with the response can be
+ # (FFI::Pointer(*FunctionProto)) Return true (1) if the specified cookie returned with the response can be
# set or false (0) otherwise.
# :cancel ::
- # (FFI::Pointer(*)) Request processing has been canceled.
+ # (FFI::Pointer(*FunctionProto)) Request processing has been canceled.
class ResourceHandler < FFI::Struct
layout :base, :char,
:process_request, :pointer,
@@ -77,5 +79,5 @@ class ResourceHandler < FFI::Struct
:can_set_cookie, :pointer,
:cancel, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_response_capi.rb b/test/output/include/capi/cef_response_capi.rb
index 7db10be..cf44c7d 100644
--- a/test/output/include/capi/cef_response_capi.rb
+++ b/test/output/include/capi/cef_response_capi.rb
@@ -1,43 +1,45 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure used to represent a web response. The functions of this structure
# may be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_read_only ::
- # (FFI::Pointer(*)) Returns true (1) if this object is read-only.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is read-only.
# :get_status ::
- # (FFI::Pointer(*)) Get the response status code.
+ # (FFI::Pointer(*FunctionProto)) Get the response status code.
# :set_status ::
- # (FFI::Pointer(*)) Set the response status code.
+ # (FFI::Pointer(*FunctionProto)) Set the response status code.
# :get_status_text ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :set_status_text ::
- # (FFI::Pointer(*)) Set the response status text.
+ # (FFI::Pointer(*FunctionProto)) Set the response status text.
# :get_mime_type ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :set_mime_type ::
- # (FFI::Pointer(*)) Set the response mime type.
+ # (FFI::Pointer(*FunctionProto)) Set the response mime type.
# :get_header ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_header_map ::
- # (FFI::Pointer(*)) Get all response header fields.
+ # (FFI::Pointer(*FunctionProto)) Get all response header fields.
# :set_header_map ::
- # (FFI::Pointer(*)) Set all response header fields.
+ # (FFI::Pointer(*FunctionProto)) Set all response header fields.
class Response < FFI::Struct
layout :base, :char,
:is_read_only, :pointer,
@@ -51,12 +53,11 @@ class Response < FFI::Struct
:get_header_map, :pointer,
:set_header_map, :pointer
end
-
+
# Create a new cef_response_t object.
- #
+
# @method response_create()
- # @return [Response]
+ # @return [Response]
# @scope class
attach_function :response_create, :cef_response_create, [], Response
-
end
diff --git a/test/output/include/capi/cef_scheme_capi.rb b/test/output/include/capi/cef_scheme_capi.rb
index ef68d82..6685716 100644
--- a/test/output/include/capi/cef_scheme_capi.rb
+++ b/test/output/include/capi/cef_scheme_capi.rb
@@ -1,22 +1,19 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
- # (Not documented)
- class SchemeHandlerFactory < FFI::Struct
- layout :dummy, :char
- end
-
+
# Register a scheme handler factory for the specified |scheme_name| and
# optional |domain_name|. An NULL |domain_name| value for a standard scheme
# will cause the factory to match all domain names. The |domain_name| value
@@ -27,37 +24,35 @@ class SchemeHandlerFactory < FFI::Struct
# function may be called multiple times to change or remove the factory that
# matches the specified |scheme_name| and optional |domain_name|. Returns false
# (0) if an error occurs. This function may be called on any thread.
- #
+
# @method register_scheme_handler_factory(scheme_name, domain_name, factory)
- # @param [FFI::Pointer(*String)] scheme_name
- # @param [FFI::Pointer(*String)] domain_name
- # @param [SchemeHandlerFactory] factory
- # @return [Integer]
+ # @param [FFI::Pointer(*String)] scheme_name
+ # @param [FFI::Pointer(*String)] domain_name
+ # @param [FFI::Pointer(*SchemeHandlerFactory)] factory
+ # @return [Integer]
# @scope class
- attach_function :register_scheme_handler_factory, :cef_register_scheme_handler_factory, [:pointer, :pointer, SchemeHandlerFactory], :int
-
+ attach_function :register_scheme_handler_factory, :cef_register_scheme_handler_factory, [:pointer, :pointer, :pointer], :int
# Clear all registered scheme handler factories. Returns false (0) on error.
# This function may be called on any thread.
- #
+
# @method clear_scheme_handler_factories()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :clear_scheme_handler_factories, :cef_clear_scheme_handler_factories, [], :int
-
# Structure that manages custom scheme registrations.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :add_custom_scheme ::
- # (FFI::Pointer(*)) Register a custom scheme. This function should not be called for the built-
+ # (FFI::Pointer(*FunctionProto)) Register a custom scheme. This function should not be called for the built-
# in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.
- #
+
# If |is_standard| is true (1) the scheme will be treated as a standard
# scheme. Standard schemes are subject to URL canonicalization and parsing
# rules as defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1
# available at http://www.ietf.org/rfc/rfc1738.txt
- #
+
# In particular, the syntax for standard scheme URLs must be of the form:
#
# (scheme)://(username):(password)@(host):(port)/(url-path)
@@ -70,12 +65,12 @@ class SchemeHandlerFactory < FFI::Struct
# canonicalized to "scheme://host/path". The origin of a standard scheme URL
# is the combination of scheme, host and port (i.e., "scheme://host:port" in
# the most explicit case).
- #
+
# For non-standard scheme URLs only the "scheme:" component is parsed and
# canonicalized. The remainder of the URL will be passed to the handler as-
# is. For example, "scheme:///some%20text" will remain the same. Non-standard
# scheme URLs cannot be used as a target for form submission.
- #
+
# If |is_local| is true (1) the scheme will be treated as local (i.e., with
# the same security rules as those applied to "file" URLs). Normal pages
# cannot link to or access local URLs. Also, by default, local URLs can only
@@ -85,12 +80,12 @@ class SchemeHandlerFactory < FFI::Struct
# CefSettings.file_access_from_file_urls_allowed value to true (1). To allow
# XMLHttpRequest calls from a local URL to all origins set the
# CefSettings.universal_access_from_file_urls_allowed value to true (1).
- #
+
# If |is_display_isolated| is true (1) the scheme will be treated as display-
# isolated. This means that pages cannot display these URLs unless they are
# from the same scheme. For example, pages in another origin cannot create
# iframes or hyperlinks to URLs with this scheme.
- #
+
# This function may be called on any thread. It should only be called once
# per unique |scheme_name| value. If |scheme_name| is already registered or
# if an error occurs this function will return false (0).
@@ -98,36 +93,36 @@ class SchemeRegistrar < FFI::Struct
layout :base, :char,
:add_custom_scheme, :pointer
end
-
+
# (Not documented)
class ResourceHandler < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Request < FFI::Struct
layout :dummy, :char
end
-
+
# Structure that creates cef_resource_handler_t instances for handling scheme
# requests. The functions of this structure will always be called on the IO
# thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :create ::
- # (FFI::Pointer(*)) Return a new resource handler instance to handle the request. |browser| and
+ # (FFI::Pointer(*FunctionProto)) Return a new resource handler instance to handle the request. |browser| and
# |frame| will be the browser window and frame respectively that originated
# the request or NULL if the request did not originate from a browser window
# (for example, if the request came from cef_urlrequest_t). The |request|
@@ -136,5 +131,5 @@ class SchemeHandlerFactory < FFI::Struct
layout :base, :char,
:create, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_stream_capi.rb b/test/output/include/capi/cef_stream_capi.rb
index cee0120..769650c 100644
--- a/test/output/include/capi/cef_stream_capi.rb
+++ b/test/output/include/capi/cef_stream_capi.rb
@@ -1,148 +1,145 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure the client can implement to provide a custom stream reader. The
# functions of this structure may be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
- # :read ::
- # (FFI::Pointer(*)) Read raw binary data.
+ # (error_unknown) Base structure.
+ # :size ::
+ # (error_unknown) Read raw binary data.
# :seek ::
- # (FFI::Pointer(*)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
+ # (FFI::Pointer(*FunctionProto)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
# SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
# :tell ::
- # (FFI::Pointer(*)) Return the current offset position.
+ # (FFI::Pointer(*FunctionProto)) Return the current offset position.
# :eof ::
- # (FFI::Pointer(*)) Return non-zero if at end of file.
+ # (FFI::Pointer(*FunctionProto)) Return non-zero if at end of file.
class ReadHandler < FFI::Struct
layout :base, :char,
- :read, :pointer,
+ :size, :char,
:seek, :pointer,
:tell, :pointer,
:eof, :pointer
end
-
+
# Structure used to read data from a stream. The functions of this structure
# may be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
- # :read ::
- # (FFI::Pointer(*)) Read raw binary data.
+ # (error_unknown) Base structure.
+ # :size ::
+ # (error_unknown) Read raw binary data.
# :seek ::
- # (FFI::Pointer(*)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
+ # (FFI::Pointer(*FunctionProto)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
# SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
# :tell ::
- # (FFI::Pointer(*)) Return the current offset position.
+ # (FFI::Pointer(*FunctionProto)) Return the current offset position.
# :eof ::
- # (FFI::Pointer(*)) Return non-zero if at end of file.
+ # (FFI::Pointer(*FunctionProto)) Return non-zero if at end of file.
class StreamReader < FFI::Struct
layout :base, :char,
- :read, :pointer,
+ :size, :char,
:seek, :pointer,
:tell, :pointer,
:eof, :pointer
end
-
+
# Create a new cef_stream_reader_t object from a file.
- #
+
# @method stream_reader_create_for_file(file_name)
- # @param [FFI::Pointer(*String)] file_name
- # @return [StreamReader]
+ # @param [FFI::Pointer(*String)] file_name
+ # @return [StreamReader]
# @scope class
attach_function :stream_reader_create_for_file, :cef_stream_reader_create_for_file, [:pointer], StreamReader
-
# Create a new cef_stream_reader_t object from data.
- #
+
# @method stream_reader_create_for_data(data, size)
- # @param [FFI::Pointer(*Void)] data
- # @param [Integer] size
- # @return [StreamReader]
+ # @param [FFI::Pointer(*Void)] data
+ # @param [Integer] size
+ # @return [StreamReader]
# @scope class
- attach_function :stream_reader_create_for_data, :cef_stream_reader_create_for_data, [:pointer, :ulong], StreamReader
-
+ attach_function :stream_reader_create_for_data, :cef_stream_reader_create_for_data, [:pointer, :int], StreamReader
# Create a new cef_stream_reader_t object from a custom handler.
- #
+
# @method stream_reader_create_for_handler(handler)
- # @param [ReadHandler] handler
- # @return [StreamReader]
+ # @param [ReadHandler] handler
+ # @return [StreamReader]
# @scope class
attach_function :stream_reader_create_for_handler, :cef_stream_reader_create_for_handler, [ReadHandler], StreamReader
-
# Structure the client can implement to provide a custom stream writer. The
# functions of this structure may be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
- # :write ::
- # (FFI::Pointer(*)) Write raw binary data.
+ # (error_unknown) Base structure.
+ # :size ::
+ # (error_unknown) Write raw binary data.
# :seek ::
- # (FFI::Pointer(*)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
+ # (FFI::Pointer(*FunctionProto)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
# SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
# :tell ::
- # (FFI::Pointer(*)) Return the current offset position.
+ # (FFI::Pointer(*FunctionProto)) Return the current offset position.
# :flush ::
- # (FFI::Pointer(*)) Flush the stream.
+ # (FFI::Pointer(*FunctionProto)) Flush the stream.
class WriteHandler < FFI::Struct
layout :base, :char,
- :write, :pointer,
+ :size, :char,
:seek, :pointer,
:tell, :pointer,
:flush, :pointer
end
-
+
# Structure used to write data to a stream. The functions of this structure may
# be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
- # :write ::
- # (FFI::Pointer(*)) Write raw binary data.
+ # (error_unknown) Base structure.
+ # :size ::
+ # (error_unknown) Write raw binary data.
# :seek ::
- # (FFI::Pointer(*)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
+ # (FFI::Pointer(*FunctionProto)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
# SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
# :tell ::
- # (FFI::Pointer(*)) Return the current offset position.
+ # (FFI::Pointer(*FunctionProto)) Return the current offset position.
# :flush ::
- # (FFI::Pointer(*)) Flush the stream.
+ # (FFI::Pointer(*FunctionProto)) Flush the stream.
class StreamWriter < FFI::Struct
layout :base, :char,
- :write, :pointer,
+ :size, :char,
:seek, :pointer,
:tell, :pointer,
:flush, :pointer
end
-
+
# Create a new cef_stream_writer_t object for a file.
- #
+
# @method stream_writer_create_for_file(file_name)
- # @param [FFI::Pointer(*String)] file_name
- # @return [StreamWriter]
+ # @param [FFI::Pointer(*String)] file_name
+ # @return [StreamWriter]
# @scope class
attach_function :stream_writer_create_for_file, :cef_stream_writer_create_for_file, [:pointer], StreamWriter
-
# Create a new cef_stream_writer_t object for a custom handler.
- #
+
# @method stream_writer_create_for_handler(handler)
- # @param [WriteHandler] handler
- # @return [StreamWriter]
+ # @param [WriteHandler] handler
+ # @return [StreamWriter]
# @scope class
attach_function :stream_writer_create_for_handler, :cef_stream_writer_create_for_handler, [WriteHandler], StreamWriter
-
end
diff --git a/test/output/include/capi/cef_string_visitor_capi.rb b/test/output/include/capi/cef_string_visitor_capi.rb
index bf3dd97..fc47bea 100644
--- a/test/output/include/capi/cef_string_visitor_capi.rb
+++ b/test/output/include/capi/cef_string_visitor_capi.rb
@@ -1,27 +1,29 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Implement this structure to receive string values asynchronously.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :visit ::
- # (FFI::Pointer(*)) Method that will be executed.
+ # (FFI::Pointer(*FunctionProto)) Method that will be executed.
class StringVisitor < FFI::Struct
layout :base, :char,
:visit, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_task_capi.rb b/test/output/include/capi/cef_task_capi.rb
index f179c4f..5438bec 100644
--- a/test/output/include/capi/cef_task_capi.rb
+++ b/test/output/include/capi/cef_task_capi.rb
@@ -1,73 +1,62 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# CEF maintains multiple internal threads that are used for handling different
# types of tasks in different processes. See the cef_thread_id_t definitions in
# cef_types.h for more information. This function will return true (1) if
# called on the specified thread. It is an error to request a thread from the
# wrong process.
- #
+
# @method currently_on(thread_id)
- # @param [unknown] thread_id
- # @return [Integer]
+ # @param [error_unknown] thread_id
+ # @return [Integer]
# @scope class
attach_function :currently_on, :cef_currently_on, [:char], :int
-
- # (Not documented)
- class Task < FFI::Struct
- layout :dummy, :char
- end
-
# Post a task for execution on the specified thread. This function may be
# called on any thread. It is an error to request a thread from the wrong
# process.
- #
+
# @method post_task(thread_id, task)
- # @param [unknown] thread_id
- # @param [Task] task
- # @return [Integer]
+ # @param [error_unknown] thread_id
+ # @param [FFI::Pointer(*Task)] task
+ # @return [Integer]
# @scope class
- attach_function :post_task, :cef_post_task, [:char, Task], :int
-
- # (Not documented)
- class Task < FFI::Struct
- layout :dummy, :char
- end
-
+ attach_function :post_task, :cef_post_task, [:char, :pointer], :int
# Post a task for delayed execution on the specified thread. This function may
# be called on any thread. It is an error to request a thread from the wrong
# process.
- #
+
# @method post_delayed_task(thread_id, task, delay_ms)
- # @param [unknown] thread_id
- # @param [Task] task
- # @param [Integer] delay_ms
- # @return [Integer]
+ # @param [error_unknown] thread_id
+ # @param [FFI::Pointer(*Task)] task
+ # @param [Integer] delay_ms
+ # @return [Integer]
# @scope class
- attach_function :post_delayed_task, :cef_post_delayed_task, [:char, Task, :long], :int
-
+ attach_function :post_delayed_task, :cef_post_delayed_task, [:char, :pointer, :long], :int
# Implement this structure for task execution. The functions of this structure
# may be called on any thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :execute ::
- # (FFI::Pointer(*)) Method that will be executed. |threadId| is the thread executing the call.
+ # (FFI::Pointer(*FunctionProto)) Method that will be executed. |threadId| is the thread executing the call.
class Task < FFI::Struct
layout :base, :char,
:execute, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_url_capi.rb b/test/output/include/capi/cef_url_capi.rb
index 8a2c3bb..7ba8984 100644
--- a/test/output/include/capi/cef_url_capi.rb
+++ b/test/output/include/capi/cef_url_capi.rb
@@ -1,36 +1,36 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Parse the specified |url| into its component parts. Returns false (0) if the
# URL is NULL or invalid.
- #
+
# @method parse_url(url, parts)
- # @param [FFI::Pointer(*String)] url
- # @param [FFI::Pointer(*Urlparts)] parts
- # @return [Integer]
+ # @param [FFI::Pointer(*String)] url
+ # @param [FFI::Pointer(*Urlparts)] parts
+ # @return [Integer]
# @scope class
attach_function :parse_url, :cef_parse_url, [:pointer, :pointer], :int
-
# Creates a URL from the specified |parts|, which must contain a non-NULL spec
# or a non-NULL host and path (at a minimum), but not both. Returns false (0)
# if |parts| isn't initialized as described.
- #
+
# @method create_url(parts, url)
- # @param [FFI::Pointer(*Urlparts)] parts
- # @param [FFI::Pointer(*String)] url
- # @return [Integer]
+ # @param [FFI::Pointer(*Urlparts)] parts
+ # @param [FFI::Pointer(*String)] url
+ # @return [Integer]
# @scope class
attach_function :create_url, :cef_create_url, [:pointer, :pointer], :int
-
end
diff --git a/test/output/include/capi/cef_urlrequest_capi.rb b/test/output/include/capi/cef_urlrequest_capi.rb
index 80e5f31..50c0641 100644
--- a/test/output/include/capi/cef_urlrequest_capi.rb
+++ b/test/output/include/capi/cef_urlrequest_capi.rb
@@ -1,52 +1,54 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class Request < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Response < FFI::Struct
layout :dummy, :char
end
-
+
# Structure used to make a URL request. URL requests are not associated with a
# browser instance so no cef_client_t callbacks will be executed. URL requests
# can be created on any valid CEF thread in either the browser or render
# process. Once created the functions of the URL request object must be
# accessed on the same thread that created it.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_request ::
- # (FFI::Pointer(*)) Returns the request object used to create this URL request. The returned
+ # (FFI::Pointer(*FunctionProto)) Returns the request object used to create this URL request. The returned
# object is read-only and should not be modified.
# :get_client ::
- # (FFI::Pointer(*)) Returns the client.
+ # (FFI::Pointer(*FunctionProto)) Returns the client.
# :get_request_status ::
- # (FFI::Pointer(*)) Returns the request status.
+ # (FFI::Pointer(*FunctionProto)) Returns the request status.
# :get_request_error ::
- # (FFI::Pointer(*)) Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
+ # (FFI::Pointer(*FunctionProto)) Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
# otherwise.
# :get_response ::
- # (FFI::Pointer(*)) Returns the response, or NULL if no response information is available.
+ # (FFI::Pointer(*FunctionProto)) Returns the response, or NULL if no response information is available.
# Response information will only be available after the upload has completed.
# The returned object is read-only and should not be modified.
# :cancel ::
- # (FFI::Pointer(*)) Cancel the request.
+ # (FFI::Pointer(*FunctionProto)) Cancel the request.
class Urlrequest < FFI::Struct
layout :base, :char,
:get_request, :pointer,
@@ -56,40 +58,39 @@ class Urlrequest < FFI::Struct
:get_response, :pointer,
:cancel, :pointer
end
-
+
# Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request
# functions are supported. The |request| object will be marked as read-only
# after calling this function.
- #
+
# @method urlrequest_create(request, client)
- # @param [Request] request
- # @param [FFI::Pointer(*UrlrequestClient)] client
- # @return [Urlrequest]
+ # @param [Request] request
+ # @param [FFI::Pointer(*UrlrequestClient)] client
+ # @return [Urlrequest]
# @scope class
attach_function :urlrequest_create, :cef_urlrequest_create, [Request, :pointer], Urlrequest
-
# Structure that should be implemented by the cef_urlrequest_t client. The
# functions of this structure will be called on the same thread that created
# the request.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :on_request_complete ::
- # (FFI::Pointer(*)) Notifies the client that the request has completed. Use the
+ # (FFI::Pointer(*FunctionProto)) Notifies the client that the request has completed. Use the
# cef_urlrequest_t::GetRequestStatus function to determine if the request was
# successful or not.
# :on_upload_progress ::
- # (FFI::Pointer(*)) Notifies the client of upload progress. |current| denotes the number of
+ # (FFI::Pointer(*FunctionProto)) Notifies the client of upload progress. |current| denotes the number of
# bytes sent so far and |total| is the total size of uploading data (or -1 if
# chunked upload is enabled). This function will only be called if the
# UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
# :on_download_progress ::
- # (FFI::Pointer(*)) Notifies the client of download progress. |current| denotes the number of
+ # (FFI::Pointer(*FunctionProto)) Notifies the client of download progress. |current| denotes the number of
# bytes received up to the call and |total| is the expected total size of the
# response (or -1 if not determined).
# :on_download_data ::
- # (FFI::Pointer(*)) Called when some part of the response is read. |data| contains the current
+ # (FFI::Pointer(*FunctionProto)) Called when some part of the response is read. |data| contains the current
# bytes received since the last call. This function will not be called if the
# UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
class UrlrequestClient < FFI::Struct
@@ -99,5 +100,5 @@ class UrlrequestClient < FFI::Struct
:on_download_progress, :pointer,
:on_download_data, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_v8_capi.rb b/test/output/include/capi/cef_v8_capi.rb
index 04ffd23..d6937ea 100644
--- a/test/output/include/capi/cef_v8_capi.rb
+++ b/test/output/include/capi/cef_v8_capi.rb
@@ -1,28 +1,25 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
- # (Not documented)
- class V8handler < FFI::Struct
- layout :dummy, :char
- end
-
+
# Register a new V8 extension with the specified JavaScript extension code and
# handler. Functions implemented by the handler are prototyped using the
# keyword 'native'. The calling of a native function is restricted to the scope
# in which the prototype of the native function is defined. This function may
# only be called on the render process main thread.
- #
+
# Example JavaScript extension code:
# // create the 'example' global object if it doesn't already exist.
# if (!example)
@@ -52,7 +49,7 @@ class V8handler < FFI::Struct
# native function SetMyParam();
# if(b) SetMyParam(b);
# });
- #
+
# // Extension definitions can also contain normal JavaScript variables
# // and functions.
# var myint = 0;
@@ -71,57 +68,56 @@ class V8handler < FFI::Struct
# // Call another function.
# example.test.increment();
#
- #
+
# @method register_extension(extension_name, javascript_code, handler)
- # @param [FFI::Pointer(*String)] extension_name
- # @param [FFI::Pointer(*String)] javascript_code
- # @param [V8handler] handler
- # @return [Integer]
+ # @param [FFI::Pointer(*String)] extension_name
+ # @param [FFI::Pointer(*String)] javascript_code
+ # @param [FFI::Pointer(*V8handler)] handler
+ # @return [Integer]
# @scope class
- attach_function :register_extension, :cef_register_extension, [:pointer, :pointer, V8handler], :int
-
+ attach_function :register_extension, :cef_register_extension, [:pointer, :pointer, :pointer], :int
# (Not documented)
class Browser < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class Frame < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class V8exception < FFI::Struct
layout :dummy, :char
end
-
+
# Structure that encapsulates a V8 context handle. The functions of this
# structure may only be called on the render process main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_browser ::
- # (FFI::Pointer(*)) Returns the browser for this context.
+ # (FFI::Pointer(*FunctionProto)) Returns the browser for this context.
# :get_frame ::
- # (FFI::Pointer(*)) Returns the frame for this context.
+ # (FFI::Pointer(*FunctionProto)) Returns the frame for this context.
# :get_global ::
- # (FFI::Pointer(*)) Returns the global object for this context. The context must be entered
+ # (FFI::Pointer(*FunctionProto)) Returns the global object for this context. The context must be entered
# before calling this function.
# :enter ::
- # (FFI::Pointer(*)) Enter this context. A context must be explicitly entered before creating a
+ # (FFI::Pointer(*FunctionProto)) Enter this context. A context must be explicitly entered before creating a
# V8 Object, Array, Function or Date asynchronously. exit() must be called
# the same number of times as enter() before releasing this context. V8
# objects belong to the context in which they are created. Returns true (1)
# if the scope was entered successfully.
# :exit ::
- # (FFI::Pointer(*)) Exit this context. Call this function only after calling enter(). Returns
+ # (FFI::Pointer(*FunctionProto)) Exit this context. Call this function only after calling enter(). Returns
# true (1) if the scope was exited successfully.
# :is_same ::
- # (FFI::Pointer(*)) Returns true (1) if this object is pointing to the same handle as |that|
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is pointing to the same handle as |that|
# object.
# :eval ::
- # (FFI::Pointer(*)) Evaluates the specified JavaScript code using this context's global object.
+ # (FFI::Pointer(*FunctionProto)) Evaluates the specified JavaScript code using this context's global object.
# On success |retval| will be set to the return value, if any, and the
# function will return true (1). On failure |exception| will be set to the
# exception, if any, and the function will return false (0).
@@ -135,37 +131,34 @@ class V8context < FFI::Struct
:is_same, :pointer,
:eval, :pointer
end
-
+
# Returns the current (top) context object in the V8 context stack.
- #
+
# @method v8context_get_current_context()
- # @return [V8context]
+ # @return [V8context]
# @scope class
attach_function :v8context_get_current_context, :cef_v8context_get_current_context, [], V8context
-
# Returns the entered (bottom) context object in the V8 context stack.
- #
+
# @method v8context_get_entered_context()
- # @return [V8context]
+ # @return [V8context]
# @scope class
attach_function :v8context_get_entered_context, :cef_v8context_get_entered_context, [], V8context
-
# Returns true (1) if V8 is currently inside a context.
- #
+
# @method v8context_in_context()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :v8context_in_context, :cef_v8context_in_context, [], :int
-
# Structure that should be implemented to handle V8 function calls. The
# functions of this structure will always be called on the render process main
# thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :execute ::
- # (FFI::Pointer(*)) Handle execution of the function identified by |name|. |object| is the
+ # (FFI::Pointer(*FunctionProto)) Handle execution of the function identified by |name|. |object| is the
# receiver ('this' object) of the function. |arguments| is the list of
# arguments passed to the function. If execution succeeds set |retval| to the
# function return value. If execution fails set |exception| to the exception
@@ -174,23 +167,23 @@ class V8handler < FFI::Struct
layout :base, :char,
:execute, :pointer
end
-
+
# Structure that should be implemented to handle V8 accessor calls. Accessor
# identifiers are registered by calling cef_v8value_t::set_value_byaccessor().
# The functions of this structure will always be called on the render process
# main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get ::
- # (FFI::Pointer(*)) Handle retrieval the accessor value identified by |name|. |object| is the
+ # (FFI::Pointer(*FunctionProto)) Handle retrieval the accessor value identified by |name|. |object| is the
# receiver ('this' object) of the accessor. If retrieval succeeds set
# |retval| to the return value. If retrieval fails set |exception| to the
# exception that will be thrown. Return true (1) if accessor retrieval was
# handled.
# :set ::
- # (FFI::Pointer(*)) Handle assignment of the accessor value identified by |name|. |object| is
+ # (FFI::Pointer(*FunctionProto)) Handle assignment of the accessor value identified by |name|. |object| is
# the receiver ('this' object) of the accessor. |value| is the new value
# being assigned to the accessor. If assignment fails set |exception| to the
# exception that will be thrown. Return true (1) if accessor assignment was
@@ -200,32 +193,32 @@ class V8accessor < FFI::Struct
:get, :pointer,
:set, :pointer
end
-
+
# Structure representing a V8 exception.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_message ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_source_line ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_script_resource_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_line_number ::
- # (FFI::Pointer(*)) Returns the 1-based number of the line where the error occurred or 0 if the
+ # (FFI::Pointer(*FunctionProto)) Returns the 1-based number of the line where the error occurred or 0 if the
# line number is unknown.
# :get_start_position ::
- # (FFI::Pointer(*)) Returns the index within the script of the first character where the error
+ # (FFI::Pointer(*FunctionProto)) Returns the index within the script of the first character where the error
# occurred.
# :get_end_position ::
- # (FFI::Pointer(*)) Returns the index within the script of the last character where the error
+ # (FFI::Pointer(*FunctionProto)) Returns the index within the script of the last character where the error
# occurred.
# :get_start_column ::
- # (FFI::Pointer(*)) Returns the index within the line of the first character where the error
+ # (FFI::Pointer(*FunctionProto)) Returns the index within the line of the first character where the error
# occurred.
# :get_end_column ::
- # (FFI::Pointer(*)) Returns the index within the line of the last character where the error
+ # (FFI::Pointer(*FunctionProto)) Returns the index within the line of the last character where the error
# occurred.
class V8exception < FFI::Struct
layout :base, :char,
@@ -238,124 +231,124 @@ class V8exception < FFI::Struct
:get_start_column, :pointer,
:get_end_column, :pointer
end
-
+
# Structure representing a V8 value. The functions of this structure may only
# be called on the render process main thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_undefined ::
- # (FFI::Pointer(*)) True if the value type is undefined.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is undefined.
# :is_null ::
- # (FFI::Pointer(*)) True if the value type is null.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is null.
# :is_bool ::
- # (FFI::Pointer(*)) True if the value type is bool.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is bool.
# :is_int ::
- # (FFI::Pointer(*)) True if the value type is int.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is int.
# :is_uint ::
- # (FFI::Pointer(*)) True if the value type is unsigned int.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is unsigned int.
# :is_double ::
- # (FFI::Pointer(*)) True if the value type is double.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is double.
# :is_date ::
- # (FFI::Pointer(*)) True if the value type is Date.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is Date.
# :is_string ::
- # (FFI::Pointer(*)) True if the value type is string.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is string.
# :is_object ::
- # (FFI::Pointer(*)) True if the value type is object.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is object.
# :is_array ::
- # (FFI::Pointer(*)) True if the value type is array.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is array.
# :is_function ::
- # (FFI::Pointer(*)) True if the value type is function.
+ # (FFI::Pointer(*FunctionProto)) True if the value type is function.
# :is_same ::
- # (FFI::Pointer(*)) Returns true (1) if this object is pointing to the same handle as |that|
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is pointing to the same handle as |that|
# object.
# :get_bool_value ::
- # (FFI::Pointer(*)) Return a bool value. The underlying data will be converted to if
+ # (FFI::Pointer(*FunctionProto)) Return a bool value. The underlying data will be converted to if
# necessary.
# :get_int_value ::
- # (FFI::Pointer(*)) Return an int value. The underlying data will be converted to if
+ # (FFI::Pointer(*FunctionProto)) Return an int value. The underlying data will be converted to if
# necessary.
# :get_uint_value ::
- # (FFI::Pointer(*)) Return an unisgned int value. The underlying data will be converted to if
+ # (FFI::Pointer(*FunctionProto)) Return an unisgned int value. The underlying data will be converted to if
# necessary.
# :get_double_value ::
- # (FFI::Pointer(*)) Return a double value. The underlying data will be converted to if
+ # (FFI::Pointer(*FunctionProto)) Return a double value. The underlying data will be converted to if
# necessary.
# :get_date_value ::
- # (FFI::Pointer(*)) Return a Date value. The underlying data will be converted to if
+ # (FFI::Pointer(*FunctionProto)) Return a Date value. The underlying data will be converted to if
# necessary.
# :get_string_value ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :is_user_created ::
- # (FFI::Pointer(*)) Returns true (1) if this is a user created object.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is a user created object.
# :has_exception ::
- # (FFI::Pointer(*)) Returns true (1) if the last function call resulted in an exception. This
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the last function call resulted in an exception. This
# attribute exists only in the scope of the current CEF value object.
# :get_exception ::
- # (FFI::Pointer(*)) Returns the exception resulting from the last function call. This attribute
+ # (FFI::Pointer(*FunctionProto)) Returns the exception resulting from the last function call. This attribute
# exists only in the scope of the current CEF value object.
# :clear_exception ::
- # (FFI::Pointer(*)) Clears the last exception and returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Clears the last exception and returns true (1) on success.
# :will_rethrow_exceptions ::
- # (FFI::Pointer(*)) Returns true (1) if this object will re-throw future exceptions. This
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object will re-throw future exceptions. This
# attribute exists only in the scope of the current CEF value object.
# :set_rethrow_exceptions ::
- # (FFI::Pointer(*)) Set whether this object will re-throw future exceptions. By default
+ # (FFI::Pointer(*FunctionProto)) Set whether this object will re-throw future exceptions. By default
# exceptions are not re-thrown. If a exception is re-thrown the current
# context should not be accessed again until after the exception has been
# caught and not re-thrown. Returns true (1) on success. This attribute
# exists only in the scope of the current CEF value object.
# :has_value_bykey ::
- # (FFI::Pointer(*)) Returns true (1) if the object has a value with the specified identifier.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the object has a value with the specified identifier.
# :has_value_byindex ::
- # (FFI::Pointer(*)) Returns true (1) if the object has a value with the specified identifier.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the object has a value with the specified identifier.
# :delete_value_bykey ::
- # (FFI::Pointer(*)) Deletes the value with the specified identifier and returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Deletes the value with the specified identifier and returns true (1) on
# success. Returns false (0) if this function is called incorrectly or an
# exception is thrown. For read-only and don't-delete values this function
# will return true (1) even though deletion failed.
# :delete_value_byindex ::
- # (FFI::Pointer(*)) Deletes the value with the specified identifier and returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Deletes the value with the specified identifier and returns true (1) on
# success. Returns false (0) if this function is called incorrectly, deletion
# fails or an exception is thrown. For read-only and don't-delete values this
# function will return true (1) even though deletion failed.
# :get_value_bykey ::
- # (FFI::Pointer(*)) Returns the value with the specified identifier on success. Returns NULL if
+ # (FFI::Pointer(*FunctionProto)) Returns the value with the specified identifier on success. Returns NULL if
# this function is called incorrectly or an exception is thrown.
# :get_value_byindex ::
- # (FFI::Pointer(*)) Returns the value with the specified identifier on success. Returns NULL if
+ # (FFI::Pointer(*FunctionProto)) Returns the value with the specified identifier on success. Returns NULL if
# this function is called incorrectly or an exception is thrown.
# :set_value_bykey ::
- # (FFI::Pointer(*)) Associates a value with the specified identifier and returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Associates a value with the specified identifier and returns true (1) on
# success. Returns false (0) if this function is called incorrectly or an
# exception is thrown. For read-only values this function will return true
# (1) even though assignment failed.
# :set_value_byindex ::
- # (FFI::Pointer(*)) Associates a value with the specified identifier and returns true (1) on
+ # (FFI::Pointer(*FunctionProto)) Associates a value with the specified identifier and returns true (1) on
# success. Returns false (0) if this function is called incorrectly or an
# exception is thrown. For read-only values this function will return true
# (1) even though assignment failed.
# :set_value_byaccessor ::
- # (FFI::Pointer(*)) Registers an identifier and returns true (1) on success. Access to the
+ # (FFI::Pointer(*FunctionProto)) Registers an identifier and returns true (1) on success. Access to the
# identifier will be forwarded to the cef_v8accessor_t instance passed to
# cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this
# function is called incorrectly or an exception is thrown. For read-only
# values this function will return true (1) even though assignment failed.
# :get_keys ::
- # (FFI::Pointer(*)) Read the keys for the object's values into the specified vector. Integer-
+ # (FFI::Pointer(*FunctionProto)) Read the keys for the object's values into the specified vector. Integer-
# based keys will also be returned as strings.
# :set_user_data ::
- # (FFI::Pointer(*)) Sets the user data for this object and returns true (1) on success. Returns
+ # (FFI::Pointer(*FunctionProto)) Sets the user data for this object and returns true (1) on success. Returns
# false (0) if this function is called incorrectly. This function can only be
# called on user created objects.
# :get_user_data ::
- # (FFI::Pointer(*)) Returns the user data, if any, assigned to this object.
+ # (FFI::Pointer(*FunctionProto)) Returns the user data, if any, assigned to this object.
# :get_externally_allocated_memory ::
- # (FFI::Pointer(*)) Returns the amount of externally allocated memory registered for the
+ # (FFI::Pointer(*FunctionProto)) Returns the amount of externally allocated memory registered for the
# object.
# :adjust_externally_allocated_memory ::
- # (FFI::Pointer(*)) Adjusts the amount of registered external memory for the object. Used to
+ # (FFI::Pointer(*FunctionProto)) Adjusts the amount of registered external memory for the object. Used to
# give V8 an indication of the amount of externally allocated memory that is
# kept alive by JavaScript objects. V8 uses this information to decide when
# to perform global garbage collection. Each cef_v8value_t tracks the amount
@@ -365,13 +358,13 @@ class V8exception < FFI::Struct
# returns the number of bytes associated with the object after the
# adjustment. This function can only be called on user created objects.
# :get_array_length ::
- # (FFI::Pointer(*)) Returns the number of elements in the array.
+ # (FFI::Pointer(*FunctionProto)) Returns the number of elements in the array.
# :get_function_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_function_handler ::
- # (FFI::Pointer(*)) Returns the function handler or NULL if not a CEF-created function.
+ # (FFI::Pointer(*FunctionProto)) Returns the function handler or NULL if not a CEF-created function.
# :execute_function ::
- # (FFI::Pointer(*)) Execute the function using the current V8 context. This function should
+ # (FFI::Pointer(*FunctionProto)) Execute the function using the current V8 context. This function should
# only be called from within the scope of a cef_v8handler_t or
# cef_v8accessor_t callback, or in combination with calling enter() and
# exit() on a stored cef_v8context_t reference. |object| is the receiver
@@ -381,7 +374,7 @@ class V8exception < FFI::Struct
# Returns NULL if this function is called incorrectly or an exception is
# thrown.
# :execute_function_with_context ::
- # (FFI::Pointer(*)) Execute the function using the specified V8 context. |object| is the
+ # (FFI::Pointer(*FunctionProto)) Execute the function using the specified V8 context. |object| is the
# receiver ('this' object) of the function. If |object| is NULL the specified
# context's global object will be used. |arguments| is the list of arguments
# that will be passed to the function. Returns the function return value on
@@ -433,106 +426,95 @@ class V8value < FFI::Struct
:execute_function, :pointer,
:execute_function_with_context, :pointer
end
-
+
# Create a new cef_v8value_t object of type undefined.
- #
+
# @method v8value_create_undefined()
- # @return [V8value]
+ # @return [V8value]
# @scope class
attach_function :v8value_create_undefined, :cef_v8value_create_undefined, [], V8value
-
# Create a new cef_v8value_t object of type null.
- #
+
# @method v8value_create_null()
- # @return [V8value]
+ # @return [V8value]
# @scope class
attach_function :v8value_create_null, :cef_v8value_create_null, [], V8value
-
# Create a new cef_v8value_t object of type bool.
- #
+
# @method v8value_create_bool(value)
- # @param [Integer] value
- # @return [V8value]
+ # @param [Integer] value
+ # @return [V8value]
# @scope class
attach_function :v8value_create_bool, :cef_v8value_create_bool, [:int], V8value
-
# Create a new cef_v8value_t object of type int.
- #
+
# @method v8value_create_int(value)
- # @param [Integer] value
- # @return [V8value]
+ # @param [Integer] value
+ # @return [V8value]
# @scope class
attach_function :v8value_create_int, :cef_v8value_create_int, [:int], V8value
-
# Create a new cef_v8value_t object of type unsigned int.
- #
+
# @method v8value_create_uint(value)
- # @param [Integer] value
- # @return [V8value]
+ # @param [Integer] value
+ # @return [V8value]
# @scope class
attach_function :v8value_create_uint, :cef_v8value_create_uint, [:uint], V8value
-
# Create a new cef_v8value_t object of type double.
- #
+
# @method v8value_create_double(value)
- # @param [Float] value
- # @return [V8value]
+ # @param [Float] value
+ # @return [V8value]
# @scope class
attach_function :v8value_create_double, :cef_v8value_create_double, [:double], V8value
-
# Create a new cef_v8value_t object of type Date. This function should only be
# called from within the scope of a cef_v8context_tHandler, cef_v8handler_t or
# cef_v8accessor_t callback, or in combination with calling enter() and exit()
# on a stored cef_v8context_t reference.
- #
+
# @method v8value_create_date(date)
- # @param [FFI::Pointer(*Time)] date
- # @return [V8value]
+ # @param [FFI::Pointer(*Time)] date
+ # @return [V8value]
# @scope class
attach_function :v8value_create_date, :cef_v8value_create_date, [:pointer], V8value
-
# Create a new cef_v8value_t object of type string.
- #
+
# @method v8value_create_string(value)
- # @param [FFI::Pointer(*String)] value
- # @return [V8value]
+ # @param [FFI::Pointer(*String)] value
+ # @return [V8value]
# @scope class
attach_function :v8value_create_string, :cef_v8value_create_string, [:pointer], V8value
-
# Create a new cef_v8value_t object of type object with optional accessor. This
# function should only be called from within the scope of a
# cef_v8context_tHandler, cef_v8handler_t or cef_v8accessor_t callback, or in
# combination with calling enter() and exit() on a stored cef_v8context_t
# reference.
- #
+
# @method v8value_create_object(accessor)
- # @param [V8accessor] accessor
- # @return [V8value]
+ # @param [V8accessor] accessor
+ # @return [V8value]
# @scope class
attach_function :v8value_create_object, :cef_v8value_create_object, [V8accessor], V8value
-
# Create a new cef_v8value_t object of type array with the specified |length|.
# If |length| is negative the returned array will have length 0. This function
# should only be called from within the scope of a cef_v8context_tHandler,
# cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
# enter() and exit() on a stored cef_v8context_t reference.
- #
+
# @method v8value_create_array(length)
- # @param [Integer] length
- # @return [V8value]
+ # @param [Integer] length
+ # @return [V8value]
# @scope class
attach_function :v8value_create_array, :cef_v8value_create_array, [:int], V8value
-
# Create a new cef_v8value_t object of type function. This function should only
# be called from within the scope of a cef_v8context_tHandler, cef_v8handler_t
# or cef_v8accessor_t callback, or in combination with calling enter() and
# exit() on a stored cef_v8context_t reference.
- #
+
# @method v8value_create_function(name, handler)
- # @param [FFI::Pointer(*String)] name
- # @param [V8handler] handler
- # @return [V8value]
+ # @param [FFI::Pointer(*String)] name
+ # @param [V8handler] handler
+ # @return [V8value]
# @scope class
attach_function :v8value_create_function, :cef_v8value_create_function, [:pointer, V8handler], V8value
-
end
diff --git a/test/output/include/capi/cef_values_capi.rb b/test/output/include/capi/cef_values_capi.rb
index 9ad94a9..6dad6d8 100644
--- a/test/output/include/capi/cef_values_capi.rb
+++ b/test/output/include/capi/cef_values_capi.rb
@@ -1,127 +1,124 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure representing a binary value. Can be used on any process and thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_valid ::
- # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions
# if this function returns false (0).
# :is_owned ::
- # (FFI::Pointer(*)) Returns true (1) if this object is currently owned by another object.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is currently owned by another object.
# :copy ::
- # (FFI::Pointer(*)) Returns a copy of this object. The data in this object will also be copied.
- # :get_size ::
- # (FFI::Pointer(*)) Returns the data size.
- # :get_data ::
- # (FFI::Pointer(*)) Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
- # the specified byte |data_offset|. Returns the number of bytes read.
+ # (FFI::Pointer(*FunctionProto)) Returns a copy of this object. The data in this object will also be copied.
+ # :size ::
+ # (error_unknown) Returns the data size.
class BinaryValue < FFI::Struct
layout :base, :char,
:is_valid, :pointer,
:is_owned, :pointer,
:copy, :pointer,
- :get_size, :pointer,
- :get_data, :pointer
+ :size, :char
end
-
+
# Creates a new object that is not owned by any other object. The specified
# |data| will be copied.
- #
+
# @method binary_value_create(data, data_size)
- # @param [FFI::Pointer(*Void)] data
- # @param [Integer] data_size
- # @return [BinaryValue]
+ # @param [FFI::Pointer(*Void)] data
+ # @param [Integer] data_size
+ # @return [BinaryValue]
# @scope class
- attach_function :binary_value_create, :cef_binary_value_create, [:pointer, :ulong], BinaryValue
-
+ attach_function :binary_value_create, :cef_binary_value_create, [:pointer, :int], BinaryValue
# Structure representing a dictionary value. Can be used on any process and
# thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_valid ::
- # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions
# if this function returns false (0).
# :is_owned ::
- # (FFI::Pointer(*)) Returns true (1) if this object is currently owned by another object.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is currently owned by another object.
# :is_read_only ::
- # (FFI::Pointer(*)) Returns true (1) if the values of this object are read-only. Some APIs may
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the values of this object are read-only. Some APIs may
# expose read-only objects.
# :copy ::
- # (FFI::Pointer(*)) Returns a writable copy of this object. If |exclude_NULL_children| is true
+ # (FFI::Pointer(*FunctionProto)) Returns a writable copy of this object. If |exclude_NULL_children| is true
# (1) any NULL dictionaries or lists will be excluded from the copy.
- # :get_size ::
- # (FFI::Pointer(*)) Returns the number of values.
+ # :size ::
+ # (error_unknown) Returns the number of values.
# :clear ::
- # (FFI::Pointer(*)) Removes all values. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Removes all values. Returns true (1) on success.
# :has_key ::
- # (FFI::Pointer(*)) Returns true (1) if the current dictionary has a value for the given key.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the current dictionary has a value for the given key.
# :get_keys ::
- # (FFI::Pointer(*)) Reads all keys for this dictionary into the specified vector.
+ # (FFI::Pointer(*FunctionProto)) Reads all keys for this dictionary into the specified vector.
# :remove ::
- # (FFI::Pointer(*)) Removes the value at the specified key. Returns true (1) is the value was
+ # (FFI::Pointer(*FunctionProto)) Removes the value at the specified key. Returns true (1) is the value was
# removed successfully.
# :get_type ::
- # (FFI::Pointer(*)) Returns the value type for the specified key.
+ # (FFI::Pointer(*FunctionProto)) Returns the value type for the specified key.
# :get_bool ::
- # (FFI::Pointer(*)) Returns the value at the specified key as type bool.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type bool.
# :get_int ::
- # (FFI::Pointer(*)) Returns the value at the specified key as type int.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type int.
# :get_double ::
- # (FFI::Pointer(*)) Returns the value at the specified key as type double.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type double.
# :get_string ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_binary ::
- # (FFI::Pointer(*)) Returns the value at the specified key as type binary.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type binary.
# :get_dictionary ::
- # (FFI::Pointer(*)) Returns the value at the specified key as type dictionary.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type dictionary.
# :get_list ::
- # (FFI::Pointer(*)) Returns the value at the specified key as type list.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type list.
# :set_null ::
- # (FFI::Pointer(*)) Sets the value at the specified key as type null. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type null. Returns true (1) if the
# value was set successfully.
# :set_bool ::
- # (FFI::Pointer(*)) Sets the value at the specified key as type bool. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type bool. Returns true (1) if the
# value was set successfully.
# :set_int ::
- # (FFI::Pointer(*)) Sets the value at the specified key as type int. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type int. Returns true (1) if the
# value was set successfully.
# :set_double ::
- # (FFI::Pointer(*)) Sets the value at the specified key as type double. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type double. Returns true (1) if the
# value was set successfully.
# :set_string ::
- # (FFI::Pointer(*)) Sets the value at the specified key as type string. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type string. Returns true (1) if the
# value was set successfully.
# :set_binary ::
- # (FFI::Pointer(*)) Sets the value at the specified key as type binary. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type binary. Returns true (1) if the
# value was set successfully. If |value| is currently owned by another object
# then the value will be copied and the |value| reference will not change.
# Otherwise, ownership will be transferred to this object and the |value|
# reference will be invalidated.
# :set_dictionary ::
- # (FFI::Pointer(*)) Sets the value at the specified key as type dict. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type dict. Returns true (1) if the
# value was set successfully. After calling this function the |value| object
# will no longer be valid. If |value| is currently owned by another object
# then the value will be copied and the |value| reference will not change.
# Otherwise, ownership will be transferred to this object and the |value|
# reference will be invalidated.
# :set_list ::
- # (FFI::Pointer(*)) Sets the value at the specified key as type list. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type list. Returns true (1) if the
# value was set successfully. After calling this function the |value| object
# will no longer be valid. If |value| is currently owned by another object
# then the value will be copied and the |value| reference will not change.
@@ -133,7 +130,7 @@ class DictionaryValue < FFI::Struct
:is_owned, :pointer,
:is_read_only, :pointer,
:copy, :pointer,
- :get_size, :pointer,
+ :size, :char,
:clear, :pointer,
:has_key, :pointer,
:get_keys, :pointer,
@@ -155,85 +152,84 @@ class DictionaryValue < FFI::Struct
:set_dictionary, :pointer,
:set_list, :pointer
end
-
+
# Creates a new object that is not owned by any other object.
- #
+
# @method dictionary_value_create()
- # @return [DictionaryValue]
+ # @return [DictionaryValue]
# @scope class
attach_function :dictionary_value_create, :cef_dictionary_value_create, [], DictionaryValue
-
# Structure representing a list value. Can be used on any process and thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :is_valid ::
- # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions
# if this function returns false (0).
# :is_owned ::
- # (FFI::Pointer(*)) Returns true (1) if this object is currently owned by another object.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is currently owned by another object.
# :is_read_only ::
- # (FFI::Pointer(*)) Returns true (1) if the values of this object are read-only. Some APIs may
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the values of this object are read-only. Some APIs may
# expose read-only objects.
# :copy ::
- # (FFI::Pointer(*)) Returns a writable copy of this object.
+ # (FFI::Pointer(*FunctionProto)) Returns a writable copy of this object.
# :set_size ::
- # (FFI::Pointer(*)) Sets the number of values. If the number of values is expanded all new
+ # (FFI::Pointer(*FunctionProto)) Sets the number of values. If the number of values is expanded all new
# value slots will default to type null. Returns true (1) on success.
- # :get_size ::
- # (FFI::Pointer(*)) Returns the number of values.
+ # :size ::
+ # (error_unknown) Returns the number of values.
# :clear ::
- # (FFI::Pointer(*)) Removes all values. Returns true (1) on success.
+ # (FFI::Pointer(*FunctionProto)) Removes all values. Returns true (1) on success.
# :remove ::
- # (FFI::Pointer(*)) Removes the value at the specified index.
+ # (FFI::Pointer(*FunctionProto)) Removes the value at the specified index.
# :get_type ::
- # (FFI::Pointer(*)) Returns the value type at the specified index.
+ # (FFI::Pointer(*FunctionProto)) Returns the value type at the specified index.
# :get_bool ::
- # (FFI::Pointer(*)) Returns the value at the specified index as type bool.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type bool.
# :get_int ::
- # (FFI::Pointer(*)) Returns the value at the specified index as type int.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type int.
# :get_double ::
- # (FFI::Pointer(*)) Returns the value at the specified index as type double.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type double.
# :get_string ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_binary ::
- # (FFI::Pointer(*)) Returns the value at the specified index as type binary.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type binary.
# :get_dictionary ::
- # (FFI::Pointer(*)) Returns the value at the specified index as type dictionary.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type dictionary.
# :get_list ::
- # (FFI::Pointer(*)) Returns the value at the specified index as type list.
+ # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type list.
# :set_null ::
- # (FFI::Pointer(*)) Sets the value at the specified index as type null. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type null. Returns true (1) if the
# value was set successfully.
# :set_bool ::
- # (FFI::Pointer(*)) Sets the value at the specified index as type bool. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type bool. Returns true (1) if the
# value was set successfully.
# :set_int ::
- # (FFI::Pointer(*)) Sets the value at the specified index as type int. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type int. Returns true (1) if the
# value was set successfully.
# :set_double ::
- # (FFI::Pointer(*)) Sets the value at the specified index as type double. Returns true (1) if
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type double. Returns true (1) if
# the value was set successfully.
# :set_string ::
- # (FFI::Pointer(*)) Sets the value at the specified index as type string. Returns true (1) if
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type string. Returns true (1) if
# the value was set successfully.
# :set_binary ::
- # (FFI::Pointer(*)) Sets the value at the specified index as type binary. Returns true (1) if
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type binary. Returns true (1) if
# the value was set successfully. After calling this function the |value|
# object will no longer be valid. If |value| is currently owned by another
# object then the value will be copied and the |value| reference will not
# change. Otherwise, ownership will be transferred to this object and the
# |value| reference will be invalidated.
# :set_dictionary ::
- # (FFI::Pointer(*)) Sets the value at the specified index as type dict. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type dict. Returns true (1) if the
# value was set successfully. After calling this function the |value| object
# will no longer be valid. If |value| is currently owned by another object
# then the value will be copied and the |value| reference will not change.
# Otherwise, ownership will be transferred to this object and the |value|
# reference will be invalidated.
# :set_list ::
- # (FFI::Pointer(*)) Sets the value at the specified index as type list. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type list. Returns true (1) if the
# value was set successfully. After calling this function the |value| object
# will no longer be valid. If |value| is currently owned by another object
# then the value will be copied and the |value| reference will not change.
@@ -246,7 +242,7 @@ class ListValue < FFI::Struct
:is_read_only, :pointer,
:copy, :pointer,
:set_size, :pointer,
- :get_size, :pointer,
+ :size, :char,
:clear, :pointer,
:remove, :pointer,
:get_type, :pointer,
@@ -266,12 +262,11 @@ class ListValue < FFI::Struct
:set_dictionary, :pointer,
:set_list, :pointer
end
-
+
# Creates a new object that is not owned by any other object.
- #
+
# @method list_value_create()
- # @return [ListValue]
+ # @return [ListValue]
# @scope class
attach_function :list_value_create, :cef_list_value_create, [], ListValue
-
end
diff --git a/test/output/include/capi/cef_web_plugin_capi.rb b/test/output/include/capi/cef_web_plugin_capi.rb
index 2a2d693..8f3ef8e 100644
--- a/test/output/include/capi/cef_web_plugin_capi.rb
+++ b/test/output/include/capi/cef_web_plugin_capi.rb
@@ -1,43 +1,39 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
- # (Not documented)
- class WebPluginInfoVisitor < FFI::Struct
- layout :dummy, :char
- end
-
+
# Visit web plugin information.
- #
+
# @method visit_web_plugin_info(visitor)
- # @param [WebPluginInfoVisitor] visitor
- # @return [nil]
+ # @param [FFI::Pointer(*WebPluginInfoVisitor)] visitor
+ # @return [nil]
# @scope class
- attach_function :visit_web_plugin_info, :cef_visit_web_plugin_info, [WebPluginInfoVisitor], :void
-
+ attach_function :visit_web_plugin_info, :cef_visit_web_plugin_info, [:pointer], :void
# Information about a specific web plugin.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :get_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_path ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_version ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_description ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
class WebPluginInfo < FFI::Struct
layout :base, :char,
:get_name, :pointer,
@@ -45,15 +41,15 @@ class WebPluginInfo < FFI::Struct
:get_version, :pointer,
:get_description, :pointer
end
-
+
# Structure to implement for visiting web plugin information. The functions of
# this structure will be called on the UI thread.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :visit ::
- # (FFI::Pointer(*)) Method that will be called once for each plugin. |count| is the 0-based
+ # (FFI::Pointer(*FunctionProto)) Method that will be called once for each plugin. |count| is the 0-based
# index for the current plugin. |total| is the total number of plugins.
# Return false (0) to stop visiting plugins. This function may never be
# called if no plugins are found.
@@ -61,5 +57,5 @@ class WebPluginInfoVisitor < FFI::Struct
layout :base, :char,
:visit, :pointer
end
-
+
end
diff --git a/test/output/include/capi/cef_xml_reader_capi.rb b/test/output/include/capi/cef_xml_reader_capi.rb
index 427d2bd..5757ff7 100644
--- a/test/output/include/capi/cef_xml_reader_capi.rb
+++ b/test/output/include/capi/cef_xml_reader_capi.rb
@@ -1,92 +1,94 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure that supports the reading of XML data via the libxml streaming API.
# The functions of this structure should only be called on the thread that
# creates the object.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :move_to_next_node ::
- # (FFI::Pointer(*)) Moves the cursor to the next node in the document. This function must be
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the next node in the document. This function must be
# called at least once to set the current cursor position. Returns true (1)
# if the cursor position was set successfully.
# :close ::
- # (FFI::Pointer(*)) Close the document. This should be called directly to ensure that cleanup
+ # (FFI::Pointer(*FunctionProto)) Close the document. This should be called directly to ensure that cleanup
# occurs on the correct thread.
# :has_error ::
- # (FFI::Pointer(*)) Returns true (1) if an error has been reported by the XML parser.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if an error has been reported by the XML parser.
# :get_error ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_type ::
- # (FFI::Pointer(*)) Returns the node type.
+ # (FFI::Pointer(*FunctionProto)) Returns the node type.
# :get_depth ::
- # (FFI::Pointer(*)) Returns the node depth. Depth starts at 0 for the root node.
+ # (FFI::Pointer(*FunctionProto)) Returns the node depth. Depth starts at 0 for the root node.
# :get_local_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_prefix ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_qualified_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_namespace_uri ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_base_uri ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_xml_lang ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :is_empty_element ::
- # (FFI::Pointer(*)) Returns true (1) if the node represents an NULL element. is considered
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the node represents an NULL element. is considered
# NULL but is not.
# :has_value ::
- # (FFI::Pointer(*)) Returns true (1) if the node has a text value.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the node has a text value.
# :get_value ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :has_attributes ::
- # (FFI::Pointer(*)) Returns true (1) if the node has attributes.
- # :get_attribute_count ::
- # (FFI::Pointer(*)) Returns the number of attributes.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if the node has attributes.
+ # :size ::
+ # (error_unknown) Returns the number of attributes.
# :get_attribute_byindex ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_attribute_byqname ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_attribute_bylname ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_inner_xml ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_outer_xml ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_line_number ::
- # (FFI::Pointer(*)) Returns the line number for the current node.
+ # (FFI::Pointer(*FunctionProto)) Returns the line number for the current node.
# :move_to_attribute_byindex ::
- # (FFI::Pointer(*)) Moves the cursor to the attribute at the specified 0-based index. Returns
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the attribute at the specified 0-based index. Returns
# true (1) if the cursor position was set successfully.
# :move_to_attribute_byqname ::
- # (FFI::Pointer(*)) Moves the cursor to the attribute with the specified qualified name.
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the attribute with the specified qualified name.
# Returns true (1) if the cursor position was set successfully.
# :move_to_attribute_bylname ::
- # (FFI::Pointer(*)) Moves the cursor to the attribute with the specified local name and
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the attribute with the specified local name and
# namespace URI. Returns true (1) if the cursor position was set
# successfully.
# :move_to_first_attribute ::
- # (FFI::Pointer(*)) Moves the cursor to the first attribute in the current element. Returns
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the first attribute in the current element. Returns
# true (1) if the cursor position was set successfully.
# :move_to_next_attribute ::
- # (FFI::Pointer(*)) Moves the cursor to the next attribute in the current element. Returns true
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the next attribute in the current element. Returns true
# (1) if the cursor position was set successfully.
# :move_to_carrying_element ::
- # (FFI::Pointer(*)) Moves the cursor back to the carrying element. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor back to the carrying element. Returns true (1) if the
# cursor position was set successfully.
class XmlReader < FFI::Struct
layout :base, :char,
@@ -106,7 +108,7 @@ class XmlReader < FFI::Struct
:has_value, :pointer,
:get_value, :pointer,
:has_attributes, :pointer,
- :get_attribute_count, :pointer,
+ :size, :char,
:get_attribute_byindex, :pointer,
:get_attribute_byqname, :pointer,
:get_attribute_bylname, :pointer,
@@ -120,21 +122,15 @@ class XmlReader < FFI::Struct
:move_to_next_attribute, :pointer,
:move_to_carrying_element, :pointer
end
-
- # (Not documented)
- class StreamReader < FFI::Struct
- layout :dummy, :char
- end
-
+
# Create a new cef_xml_reader_t object. The returned object's functions can
# only be called from the thread that created the object.
- #
+
# @method xml_reader_create(stream, encoding_type, uri)
- # @param [StreamReader] stream
- # @param [unknown] encoding_type
- # @param [FFI::Pointer(*String)] uri
- # @return [XmlReader]
+ # @param [FFI::Pointer(*StreamReader)] stream
+ # @param [error_unknown] encoding_type
+ # @param [FFI::Pointer(*String)] uri
+ # @return [XmlReader]
# @scope class
- attach_function :xml_reader_create, :cef_xml_reader_create, [StreamReader, :char, :pointer], XmlReader
-
+ attach_function :xml_reader_create, :cef_xml_reader_create, [:pointer, :char, :pointer], XmlReader
end
diff --git a/test/output/include/capi/cef_zip_reader_capi.rb b/test/output/include/capi/cef_zip_reader_capi.rb
index 23e3e46..9932564 100644
--- a/test/output/include/capi/cef_zip_reader_capi.rb
+++ b/test/output/include/capi/cef_zip_reader_capi.rb
@@ -1,55 +1,57 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure that supports the reading of zip archives via the zlib unzip API.
# The functions of this structure should only be called on the thread that
# creates the object.
- #
+
# = Fields:
# :base ::
- # (unknown) Base structure.
+ # (error_unknown) Base structure.
# :move_to_first_file ::
- # (FFI::Pointer(*)) Moves the cursor to the first file in the archive. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the first file in the archive. Returns true (1) if the
# cursor position was set successfully.
# :move_to_next_file ::
- # (FFI::Pointer(*)) Moves the cursor to the next file in the archive. Returns true (1) if the
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the next file in the archive. Returns true (1) if the
# cursor position was set successfully.
# :move_to_file ::
- # (FFI::Pointer(*)) Moves the cursor to the specified file in the archive. If |caseSensitive|
+ # (FFI::Pointer(*FunctionProto)) Moves the cursor to the specified file in the archive. If |caseSensitive|
# is true (1) then the search will be case sensitive. Returns true (1) if the
# cursor position was set successfully.
# :close ::
- # (FFI::Pointer(*)) Closes the archive. This should be called directly to ensure that cleanup
+ # (FFI::Pointer(*FunctionProto)) Closes the archive. This should be called directly to ensure that cleanup
# occurs on the correct thread.
# :get_file_name ::
- # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free().
+ # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free().
# :get_file_size ::
- # (FFI::Pointer(*)) Returns the uncompressed size of the file.
- # :get_file_last_modified ::
- # (FFI::Pointer(*)) Returns the last modified timestamp for the file.
+ # (FFI::Pointer(*FunctionProto)) Returns the uncompressed size of the file.
+ # :time ::
+ # (error_unknown) Returns the last modified timestamp for the file.
# :open_file ::
- # (FFI::Pointer(*)) Opens the file for reading of uncompressed data. A read password may
+ # (FFI::Pointer(*FunctionProto)) Opens the file for reading of uncompressed data. A read password may
# optionally be specified.
# :close_file ::
- # (FFI::Pointer(*)) Closes the file.
+ # (FFI::Pointer(*FunctionProto)) Closes the file.
# :read_file ::
- # (FFI::Pointer(*)) Read uncompressed file contents into the specified buffer. Returns < 0 if
+ # (FFI::Pointer(*FunctionProto)) Read uncompressed file contents into the specified buffer. Returns < 0 if
# an error occurred, 0 if at the end of file, or the number of bytes read.
# :tell ::
- # (FFI::Pointer(*)) Returns the current offset in the uncompressed file contents.
+ # (FFI::Pointer(*FunctionProto)) Returns the current offset in the uncompressed file contents.
# :eof ::
- # (FFI::Pointer(*)) Returns true (1) if at end of the file contents.
+ # (FFI::Pointer(*FunctionProto)) Returns true (1) if at end of the file contents.
class ZipReader < FFI::Struct
layout :base, :char,
:move_to_first_file, :pointer,
@@ -58,26 +60,20 @@ class ZipReader < FFI::Struct
:close, :pointer,
:get_file_name, :pointer,
:get_file_size, :pointer,
- :get_file_last_modified, :pointer,
+ :time, :char,
:open_file, :pointer,
:close_file, :pointer,
:read_file, :pointer,
:tell, :pointer,
:eof, :pointer
end
-
- # (Not documented)
- class StreamReader < FFI::Struct
- layout :dummy, :char
- end
-
+
# Create a new cef_zip_reader_t object. The returned object's functions can
# only be called from the thread that created the object.
- #
+
# @method zip_reader_create(stream)
- # @param [StreamReader] stream
- # @return [ZipReader]
+ # @param [FFI::Pointer(*StreamReader)] stream
+ # @return [ZipReader]
# @scope class
- attach_function :zip_reader_create, :cef_zip_reader_create, [StreamReader], ZipReader
-
+ attach_function :zip_reader_create, :cef_zip_reader_create, [:pointer], ZipReader
end
diff --git a/test/output/include/internal/cef_build.rb b/test/output/include/internal/cef_build.rb
index 6a45af6..a9c0609 100644
--- a/test/output/include/internal/cef_build.rb
+++ b/test/output/include/internal/cef_build.rb
@@ -1,25 +1,27 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
OS_LINUX = 1
-
+
OS_POSIX = 1
-
+
COMPILER_GCC = 1
-
+
def allow_this_in_initializer_list(code)
code
end
-
+
end
diff --git a/test/output/include/internal/cef_export.rb b/test/output/include/internal/cef_export.rb
index 46caee6..f69421e 100644
--- a/test/output/include/internal/cef_export.rb
+++ b/test/output/include/internal/cef_export.rb
@@ -1,15 +1,17 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
end
diff --git a/test/output/include/internal/cef_linux.rb b/test/output/include/internal/cef_linux.rb
index 46caee6..f69421e 100644
--- a/test/output/include/internal/cef_linux.rb
+++ b/test/output/include/internal/cef_linux.rb
@@ -1,15 +1,17 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
end
diff --git a/test/output/include/internal/cef_mac.rb b/test/output/include/internal/cef_mac.rb
index 46caee6..f69421e 100644
--- a/test/output/include/internal/cef_mac.rb
+++ b/test/output/include/internal/cef_mac.rb
@@ -1,15 +1,17 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
end
diff --git a/test/output/include/internal/cef_ptr.rb b/test/output/include/internal/cef_ptr.rb
index 46caee6..f69421e 100644
--- a/test/output/include/internal/cef_ptr.rb
+++ b/test/output/include/internal/cef_ptr.rb
@@ -1,15 +1,17 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
end
diff --git a/test/output/include/internal/cef_string.rb b/test/output/include/internal/cef_string.rb
index d00a3b6..d2bbb4c 100644
--- a/test/output/include/internal/cef_string.rb
+++ b/test/output/include/internal/cef_string.rb
@@ -1,17 +1,19 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
STRING_TYPE_UTF16 = 1
-
+
end
diff --git a/test/output/include/internal/cef_string_list.rb b/test/output/include/internal/cef_string_list.rb
index f2f65df..7ff6184 100644
--- a/test/output/include/internal/cef_string_list.rb
+++ b/test/output/include/internal/cef_string_list.rb
@@ -1,74 +1,69 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Allocate a new string map.
- #
+
# @method string_list_alloc()
- # @return [FFI::Pointer(StringList)]
+ # @return [FFI::Pointer(StringList)]
# @scope class
attach_function :string_list_alloc, :cef_string_list_alloc, [], :pointer
-
# Return the number of elements in the string list.
- #
+
# @method string_list_size(list)
- # @param [FFI::Pointer(StringList)] list
- # @return [Integer]
+ # @param [FFI::Pointer(StringList)] list
+ # @return [Integer]
# @scope class
attach_function :string_list_size, :cef_string_list_size, [:pointer], :int
-
# Retrieve the value at the specified zero-based string list index. Returns
# true (1) if the value was successfully retrieved.
- #
+
# @method string_list_value(list, index, value)
- # @param [FFI::Pointer(StringList)] list
- # @param [Integer] index
- # @param [FFI::Pointer(*String)] value
- # @return [Integer]
+ # @param [FFI::Pointer(StringList)] list
+ # @param [Integer] index
+ # @param [FFI::Pointer(*String)] value
+ # @return [Integer]
# @scope class
attach_function :string_list_value, :cef_string_list_value, [:pointer, :int, :pointer], :int
-
# Append a new value at the end of the string list.
- #
+
# @method string_list_append(list, value)
- # @param [FFI::Pointer(StringList)] list
- # @param [FFI::Pointer(*String)] value
- # @return [nil]
+ # @param [FFI::Pointer(StringList)] list
+ # @param [FFI::Pointer(*String)] value
+ # @return [nil]
# @scope class
attach_function :string_list_append, :cef_string_list_append, [:pointer, :pointer], :void
-
# Clear the string list.
- #
+
# @method string_list_clear(list)
- # @param [FFI::Pointer(StringList)] list
- # @return [nil]
+ # @param [FFI::Pointer(StringList)] list
+ # @return [nil]
# @scope class
attach_function :string_list_clear, :cef_string_list_clear, [:pointer], :void
-
# Free the string list.
- #
+
# @method string_list_free(list)
- # @param [FFI::Pointer(StringList)] list
- # @return [nil]
+ # @param [FFI::Pointer(StringList)] list
+ # @return [nil]
# @scope class
attach_function :string_list_free, :cef_string_list_free, [:pointer], :void
-
# Creates a copy of an existing string list.
- #
+
# @method string_list_copy(list)
- # @param [FFI::Pointer(StringList)] list
- # @return [FFI::Pointer(StringList)]
+ # @param [FFI::Pointer(StringList)] list
+ # @return [FFI::Pointer(StringList)]
# @scope class
attach_function :string_list_copy, :cef_string_list_copy, [:pointer], :pointer
-
end
diff --git a/test/output/include/internal/cef_string_map.rb b/test/output/include/internal/cef_string_map.rb
index 0ce2fea..c188bdc 100644
--- a/test/output/include/internal/cef_string_map.rb
+++ b/test/output/include/internal/cef_string_map.rb
@@ -1,86 +1,80 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Allocate a new string map.
- #
+
# @method string_map_alloc()
- # @return [FFI::Pointer(StringMap)]
+ # @return [FFI::Pointer(StringMap)]
# @scope class
attach_function :string_map_alloc, :cef_string_map_alloc, [], :pointer
-
# Return the number of elements in the string map.
- #
+
# @method string_map_size(map)
- # @param [FFI::Pointer(StringMap)] map
- # @return [Integer]
+ # @param [FFI::Pointer(StringMap)] map
+ # @return [Integer]
# @scope class
attach_function :string_map_size, :cef_string_map_size, [:pointer], :int
-
# Return the value assigned to the specified key.
- #
+
# @method string_map_find(map, key, value)
- # @param [FFI::Pointer(StringMap)] map
- # @param [FFI::Pointer(*String)] key
- # @param [FFI::Pointer(*String)] value
- # @return [Integer]
+ # @param [FFI::Pointer(StringMap)] map
+ # @param [FFI::Pointer(*String)] key
+ # @param [FFI::Pointer(*String)] value
+ # @return [Integer]
# @scope class
attach_function :string_map_find, :cef_string_map_find, [:pointer, :pointer, :pointer], :int
-
# Return the key at the specified zero-based string map index.
- #
+
# @method string_map_key(map, index, key)
- # @param [FFI::Pointer(StringMap)] map
- # @param [Integer] index
- # @param [FFI::Pointer(*String)] key
- # @return [Integer]
+ # @param [FFI::Pointer(StringMap)] map
+ # @param [Integer] index
+ # @param [FFI::Pointer(*String)] key
+ # @return [Integer]
# @scope class
attach_function :string_map_key, :cef_string_map_key, [:pointer, :int, :pointer], :int
-
# Return the value at the specified zero-based string map index.
- #
+
# @method string_map_value(map, index, value)
- # @param [FFI::Pointer(StringMap)] map
- # @param [Integer] index
- # @param [FFI::Pointer(*String)] value
- # @return [Integer]
+ # @param [FFI::Pointer(StringMap)] map
+ # @param [Integer] index
+ # @param [FFI::Pointer(*String)] value
+ # @return [Integer]
# @scope class
attach_function :string_map_value, :cef_string_map_value, [:pointer, :int, :pointer], :int
-
# Append a new key/value pair at the end of the string map.
- #
+
# @method string_map_append(map, key, value)
- # @param [FFI::Pointer(StringMap)] map
- # @param [FFI::Pointer(*String)] key
- # @param [FFI::Pointer(*String)] value
- # @return [Integer]
+ # @param [FFI::Pointer(StringMap)] map
+ # @param [FFI::Pointer(*String)] key
+ # @param [FFI::Pointer(*String)] value
+ # @return [Integer]
# @scope class
attach_function :string_map_append, :cef_string_map_append, [:pointer, :pointer, :pointer], :int
-
# Clear the string map.
- #
+
# @method string_map_clear(map)
- # @param [FFI::Pointer(StringMap)] map
- # @return [nil]
+ # @param [FFI::Pointer(StringMap)] map
+ # @return [nil]
# @scope class
attach_function :string_map_clear, :cef_string_map_clear, [:pointer], :void
-
# Free the string map.
- #
+
# @method string_map_free(map)
- # @param [FFI::Pointer(StringMap)] map
- # @return [nil]
+ # @param [FFI::Pointer(StringMap)] map
+ # @return [nil]
# @scope class
attach_function :string_map_free, :cef_string_map_free, [:pointer], :void
-
end
diff --git a/test/output/include/internal/cef_string_multimap.rb b/test/output/include/internal/cef_string_multimap.rb
index cd913c7..4ee54e8 100644
--- a/test/output/include/internal/cef_string_multimap.rb
+++ b/test/output/include/internal/cef_string_multimap.rb
@@ -1,96 +1,89 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Allocate a new string multimap.
- #
+
# @method string_multimap_alloc()
- # @return [FFI::Pointer(StringMultimap)]
+ # @return [FFI::Pointer(StringMultimap)]
# @scope class
attach_function :string_multimap_alloc, :cef_string_multimap_alloc, [], :pointer
-
# Return the number of elements in the string multimap.
- #
+
# @method string_multimap_size(map)
- # @param [FFI::Pointer(StringMultimap)] map
- # @return [Integer]
+ # @param [FFI::Pointer(StringMultimap)] map
+ # @return [Integer]
# @scope class
attach_function :string_multimap_size, :cef_string_multimap_size, [:pointer], :int
-
# Return the number of values with the specified key.
- #
+
# @method string_multimap_find_count(map, key)
- # @param [FFI::Pointer(StringMultimap)] map
- # @param [FFI::Pointer(*String)] key
- # @return [Integer]
+ # @param [FFI::Pointer(StringMultimap)] map
+ # @param [FFI::Pointer(*String)] key
+ # @return [Integer]
# @scope class
attach_function :string_multimap_find_count, :cef_string_multimap_find_count, [:pointer, :pointer], :int
-
# Return the value_index-th value with the specified key.
- #
+
# @method string_multimap_enumerate(map, key, value_index, value)
- # @param [FFI::Pointer(StringMultimap)] map
- # @param [FFI::Pointer(*String)] key
- # @param [Integer] value_index
- # @param [FFI::Pointer(*String)] value
- # @return [Integer]
+ # @param [FFI::Pointer(StringMultimap)] map
+ # @param [FFI::Pointer(*String)] key
+ # @param [Integer] value_index
+ # @param [FFI::Pointer(*String)] value
+ # @return [Integer]
# @scope class
attach_function :string_multimap_enumerate, :cef_string_multimap_enumerate, [:pointer, :pointer, :int, :pointer], :int
-
# Return the key at the specified zero-based string multimap index.
- #
+
# @method string_multimap_key(map, index, key)
- # @param [FFI::Pointer(StringMultimap)] map
- # @param [Integer] index
- # @param [FFI::Pointer(*String)] key
- # @return [Integer]
+ # @param [FFI::Pointer(StringMultimap)] map
+ # @param [Integer] index
+ # @param [FFI::Pointer(*String)] key
+ # @return [Integer]
# @scope class
attach_function :string_multimap_key, :cef_string_multimap_key, [:pointer, :int, :pointer], :int
-
# Return the value at the specified zero-based string multimap index.
- #
+
# @method string_multimap_value(map, index, value)
- # @param [FFI::Pointer(StringMultimap)] map
- # @param [Integer] index
- # @param [FFI::Pointer(*String)] value
- # @return [Integer]
+ # @param [FFI::Pointer(StringMultimap)] map
+ # @param [Integer] index
+ # @param [FFI::Pointer(*String)] value
+ # @return [Integer]
# @scope class
attach_function :string_multimap_value, :cef_string_multimap_value, [:pointer, :int, :pointer], :int
-
# Append a new key/value pair at the end of the string multimap.
- #
+
# @method string_multimap_append(map, key, value)
- # @param [FFI::Pointer(StringMultimap)] map
- # @param [FFI::Pointer(*String)] key
- # @param [FFI::Pointer(*String)] value
- # @return [Integer]
+ # @param [FFI::Pointer(StringMultimap)] map
+ # @param [FFI::Pointer(*String)] key
+ # @param [FFI::Pointer(*String)] value
+ # @return [Integer]
# @scope class
attach_function :string_multimap_append, :cef_string_multimap_append, [:pointer, :pointer, :pointer], :int
-
# Clear the string multimap.
- #
+
# @method string_multimap_clear(map)
- # @param [FFI::Pointer(StringMultimap)] map
- # @return [nil]
+ # @param [FFI::Pointer(StringMultimap)] map
+ # @return [nil]
# @scope class
attach_function :string_multimap_clear, :cef_string_multimap_clear, [:pointer], :void
-
# Free the string multimap.
- #
+
# @method string_multimap_free(map)
- # @param [FFI::Pointer(StringMultimap)] map
- # @return [nil]
+ # @param [FFI::Pointer(StringMultimap)] map
+ # @return [nil]
# @scope class
attach_function :string_multimap_free, :cef_string_multimap_free, [:pointer], :void
-
end
diff --git a/test/output/include/internal/cef_string_types.rb b/test/output/include/internal/cef_string_types.rb
index db605ce..352ccd5 100644
--- a/test/output/include/internal/cef_string_types.rb
+++ b/test/output/include/internal/cef_string_types.rb
@@ -1,332 +1,311 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
def string_wide_copy(src, src_len, output)
string_wide_set(src, src_len, output, TRUE)
end
-
+
def string_utf8_copy(src, src_len, output)
string_utf8_set(src, src_len, output, TRUE)
end
-
+
def string_utf16_copy(src, src_len, output)
string_utf16_set(src, src_len, output, TRUE)
end
-
+
# functions if you want this managed for you.
- #
+
# = Fields:
# :str ::
- # (FFI::Pointer(*Wchar))
+ # (FFI::Pointer(*Int))
# :length ::
- # (Integer)
+ # (Integer)
# :dtor ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
module StringWideWrappers
- # @return [nil]
+ # @return [nil]
def clear()
CEF.string_wide_clear(self)
end
-
- # @param [FFI::Pointer(*StringWide)] str2
- # @return [Integer]
+
+ # @param [FFI::Pointer(*StringWide)] str2
+ # @return [Integer]
def cmp(str2)
CEF.string_wide_cmp(self, str2)
end
end
-
+
class StringWide < FFI::Struct
include StringWideWrappers
layout :str, :pointer,
- :length, :ulong,
+ :length, :int,
:dtor, :pointer
end
-
+
# (Not documented)
- #
+
# = Fields:
# :str ::
- # (String)
+ # (String)
# :length ::
- # (Integer)
+ # (Integer)
# :dtor ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
module StringUtf8Wrappers
- # @return [nil]
+ # @return [nil]
def clear()
CEF.string_utf8_clear(self)
end
-
- # @param [FFI::Pointer(*StringUtf8)] str2
- # @return [Integer]
+
+ # @param [FFI::Pointer(*StringUtf8)] str2
+ # @return [Integer]
def cmp(str2)
CEF.string_utf8_cmp(self, str2)
end
end
-
+
class StringUtf8 < FFI::Struct
include StringUtf8Wrappers
layout :str, :string,
- :length, :ulong,
+ :length, :int,
:dtor, :pointer
end
-
+
# (Not documented)
- #
+
# = Fields:
# :str ::
- # (FFI::Pointer(*Char16))
+ # (FFI::Pointer(*Char16))
# :length ::
- # (Integer)
+ # (Integer)
# :dtor ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
module StringUtf16Wrappers
- # @return [nil]
+ # @return [nil]
def clear()
CEF.string_utf16_clear(self)
end
-
- # @param [FFI::Pointer(*StringUtf16)] str2
- # @return [Integer]
+
+ # @param [FFI::Pointer(*StringUtf16)] str2
+ # @return [Integer]
def cmp(str2)
CEF.string_utf16_cmp(self, str2)
end
end
-
+
class StringUtf16 < FFI::Struct
include StringUtf16Wrappers
layout :str, :pointer,
- :length, :ulong,
+ :length, :int,
:dtor, :pointer
end
-
+
# These functions set string values. If |copy| is true (1) the value will be
# copied instead of referenced. It is up to the user to properly manage
# the lifespan of references.
- #
+
# @method string_wide_set(src, src_len, output, copy)
- # @param [FFI::Pointer(*Wchar)] src
- # @param [Integer] src_len
- # @param [StringWide] output
- # @param [Integer] copy
- # @return [Integer]
+ # @param [FFI::Pointer(*Int)] src
+ # @param [Integer] src_len
+ # @param [StringWide] output
+ # @param [Integer] copy
+ # @return [Integer]
# @scope class
- attach_function :string_wide_set, :cef_string_wide_set, [:pointer, :ulong, StringWide, :int], :int
-
+ attach_function :string_wide_set, :cef_string_wide_set, [:pointer, :int, StringWide, :int], :int
# (Not documented)
- #
+
# @method string_utf8_set(src, src_len, output, copy)
- # @param [String] src
- # @param [Integer] src_len
- # @param [StringUtf8] output
- # @param [Integer] copy
- # @return [Integer]
+ # @param [String] src
+ # @param [Integer] src_len
+ # @param [StringUtf8] output
+ # @param [Integer] copy
+ # @return [Integer]
# @scope class
- attach_function :string_utf8_set, :cef_string_utf8_set, [:string, :ulong, StringUtf8, :int], :int
-
+ attach_function :string_utf8_set, :cef_string_utf8_set, [:string, :int, StringUtf8, :int], :int
# (Not documented)
- #
+
# @method string_utf16_set(src, src_len, output, copy)
- # @param [FFI::Pointer(*Char16)] src
- # @param [Integer] src_len
- # @param [StringUtf16] output
- # @param [Integer] copy
- # @return [Integer]
+ # @param [FFI::Pointer(*Char16)] src
+ # @param [Integer] src_len
+ # @param [StringUtf16] output
+ # @param [Integer] copy
+ # @return [Integer]
# @scope class
- attach_function :string_utf16_set, :cef_string_utf16_set, [:pointer, :ulong, StringUtf16, :int], :int
-
+ attach_function :string_utf16_set, :cef_string_utf16_set, [:pointer, :int, StringUtf16, :int], :int
# These functions clear string values. The structure itself is not freed.
- #
+
# @method string_wide_clear(str)
- # @param [StringWide] str
- # @return [nil]
+ # @param [StringWide] str
+ # @return [nil]
# @scope class
attach_function :string_wide_clear, :cef_string_wide_clear, [StringWide], :void
-
# (Not documented)
- #
+
# @method string_utf8_clear(str)
- # @param [StringUtf8] str
- # @return [nil]
+ # @param [StringUtf8] str
+ # @return [nil]
# @scope class
attach_function :string_utf8_clear, :cef_string_utf8_clear, [StringUtf8], :void
-
# (Not documented)
- #
+
# @method string_utf16_clear(str)
- # @param [StringUtf16] str
- # @return [nil]
+ # @param [StringUtf16] str
+ # @return [nil]
# @scope class
attach_function :string_utf16_clear, :cef_string_utf16_clear, [StringUtf16], :void
-
# These functions compare two string values with the same results as strcmp().
- #
+
# @method string_wide_cmp(str1, str2)
- # @param [StringWide] str1
- # @param [StringWide] str2
- # @return [Integer]
+ # @param [StringWide] str1
+ # @param [StringWide] str2
+ # @return [Integer]
# @scope class
attach_function :string_wide_cmp, :cef_string_wide_cmp, [StringWide, StringWide], :int
-
# (Not documented)
- #
+
# @method string_utf8_cmp(str1, str2)
- # @param [StringUtf8] str1
- # @param [StringUtf8] str2
- # @return [Integer]
+ # @param [StringUtf8] str1
+ # @param [StringUtf8] str2
+ # @return [Integer]
# @scope class
attach_function :string_utf8_cmp, :cef_string_utf8_cmp, [StringUtf8, StringUtf8], :int
-
# (Not documented)
- #
+
# @method string_utf16_cmp(str1, str2)
- # @param [StringUtf16] str1
- # @param [StringUtf16] str2
- # @return [Integer]
+ # @param [StringUtf16] str1
+ # @param [StringUtf16] str2
+ # @return [Integer]
# @scope class
attach_function :string_utf16_cmp, :cef_string_utf16_cmp, [StringUtf16, StringUtf16], :int
-
# These functions convert between UTF-8, -16, and -32 strings. They are
# potentially slow so unnecessary conversions should be avoided. The best
# possible result will always be written to |output| with the boolean return
# value indicating whether the conversion is 100% valid.
- #
+
# @method string_wide_to_utf8(src, src_len, output)
- # @param [FFI::Pointer(*Wchar)] src
- # @param [Integer] src_len
- # @param [StringUtf8] output
- # @return [Integer]
+ # @param [FFI::Pointer(*Int)] src
+ # @param [Integer] src_len
+ # @param [StringUtf8] output
+ # @return [Integer]
# @scope class
- attach_function :string_wide_to_utf8, :cef_string_wide_to_utf8, [:pointer, :ulong, StringUtf8], :int
-
+ attach_function :string_wide_to_utf8, :cef_string_wide_to_utf8, [:pointer, :int, StringUtf8], :int
# (Not documented)
- #
+
# @method string_utf8_to_wide(src, src_len, output)
- # @param [String] src
- # @param [Integer] src_len
- # @param [StringWide] output
- # @return [Integer]
+ # @param [String] src
+ # @param [Integer] src_len
+ # @param [StringWide] output
+ # @return [Integer]
# @scope class
- attach_function :string_utf8_to_wide, :cef_string_utf8_to_wide, [:string, :ulong, StringWide], :int
-
+ attach_function :string_utf8_to_wide, :cef_string_utf8_to_wide, [:string, :int, StringWide], :int
# (Not documented)
- #
+
# @method string_wide_to_utf16(src, src_len, output)
- # @param [FFI::Pointer(*Wchar)] src
- # @param [Integer] src_len
- # @param [StringUtf16] output
- # @return [Integer]
+ # @param [FFI::Pointer(*Int)] src
+ # @param [Integer] src_len
+ # @param [StringUtf16] output
+ # @return [Integer]
# @scope class
- attach_function :string_wide_to_utf16, :cef_string_wide_to_utf16, [:pointer, :ulong, StringUtf16], :int
-
+ attach_function :string_wide_to_utf16, :cef_string_wide_to_utf16, [:pointer, :int, StringUtf16], :int
# (Not documented)
- #
+
# @method string_utf16_to_wide(src, src_len, output)
- # @param [FFI::Pointer(*Char16)] src
- # @param [Integer] src_len
- # @param [StringWide] output
- # @return [Integer]
+ # @param [FFI::Pointer(*Char16)] src
+ # @param [Integer] src_len
+ # @param [StringWide] output
+ # @return [Integer]
# @scope class
- attach_function :string_utf16_to_wide, :cef_string_utf16_to_wide, [:pointer, :ulong, StringWide], :int
-
+ attach_function :string_utf16_to_wide, :cef_string_utf16_to_wide, [:pointer, :int, StringWide], :int
# (Not documented)
- #
+
# @method string_utf8_to_utf16(src, src_len, output)
- # @param [String] src
- # @param [Integer] src_len
- # @param [StringUtf16] output
- # @return [Integer]
+ # @param [String] src
+ # @param [Integer] src_len
+ # @param [StringUtf16] output
+ # @return [Integer]
# @scope class
- attach_function :string_utf8_to_utf16, :cef_string_utf8_to_utf16, [:string, :ulong, StringUtf16], :int
-
+ attach_function :string_utf8_to_utf16, :cef_string_utf8_to_utf16, [:string, :int, StringUtf16], :int
# (Not documented)
- #
+
# @method string_utf16_to_utf8(src, src_len, output)
- # @param [FFI::Pointer(*Char16)] src
- # @param [Integer] src_len
- # @param [StringUtf8] output
- # @return [Integer]
+ # @param [FFI::Pointer(*Char16)] src
+ # @param [Integer] src_len
+ # @param [StringUtf8] output
+ # @return [Integer]
# @scope class
- attach_function :string_utf16_to_utf8, :cef_string_utf16_to_utf8, [:pointer, :ulong, StringUtf8], :int
-
+ attach_function :string_utf16_to_utf8, :cef_string_utf16_to_utf8, [:pointer, :int, StringUtf8], :int
# These functions convert an ASCII string, typically a hardcoded constant, to a
# Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know
# the string is ASCII.
- #
+
# @method string_ascii_to_wide(src, src_len, output)
- # @param [String] src
- # @param [Integer] src_len
- # @param [StringWide] output
- # @return [Integer]
+ # @param [String] src
+ # @param [Integer] src_len
+ # @param [StringWide] output
+ # @return [Integer]
# @scope class
- attach_function :string_ascii_to_wide, :cef_string_ascii_to_wide, [:string, :ulong, StringWide], :int
-
+ attach_function :string_ascii_to_wide, :cef_string_ascii_to_wide, [:string, :int, StringWide], :int
# (Not documented)
- #
+
# @method string_ascii_to_utf16(src, src_len, output)
- # @param [String] src
- # @param [Integer] src_len
- # @param [StringUtf16] output
- # @return [Integer]
+ # @param [String] src
+ # @param [Integer] src_len
+ # @param [StringUtf16] output
+ # @return [Integer]
# @scope class
- attach_function :string_ascii_to_utf16, :cef_string_ascii_to_utf16, [:string, :ulong, StringUtf16], :int
-
+ attach_function :string_ascii_to_utf16, :cef_string_ascii_to_utf16, [:string, :int, StringUtf16], :int
# These functions allocate a new string structure. They must be freed by
# calling the associated free function.
- #
+
# @method string_userfree_wide_alloc()
- # @return [StringWide]
+ # @return [StringWide]
# @scope class
attach_function :string_userfree_wide_alloc, :cef_string_userfree_wide_alloc, [], StringWide
-
# (Not documented)
- #
+
# @method string_userfree_utf8_alloc()
- # @return [StringUtf8]
+ # @return [StringUtf8]
# @scope class
attach_function :string_userfree_utf8_alloc, :cef_string_userfree_utf8_alloc, [], StringUtf8
-
# (Not documented)
- #
+
# @method string_userfree_utf16_alloc()
- # @return [StringUtf16]
+ # @return [StringUtf16]
# @scope class
attach_function :string_userfree_utf16_alloc, :cef_string_userfree_utf16_alloc, [], StringUtf16
-
# These functions free the string structure allocated by the associated
# alloc function. Any string contents will first be cleared.
- #
+
# @method string_userfree_wide_free(str)
- # @param [StringWide] str
- # @return [nil]
+ # @param [StringWide] str
+ # @return [nil]
# @scope class
attach_function :string_userfree_wide_free, :cef_string_userfree_wide_free, [StringWide], :void
-
# (Not documented)
- #
+
# @method string_userfree_utf8_free(str)
- # @param [StringUtf8] str
- # @return [nil]
+ # @param [StringUtf8] str
+ # @return [nil]
# @scope class
attach_function :string_userfree_utf8_free, :cef_string_userfree_utf8_free, [StringUtf8], :void
-
# (Not documented)
- #
+
# @method string_userfree_utf16_free(str)
- # @param [StringUtf16] str
- # @return [nil]
+ # @param [StringUtf16] str
+ # @return [nil]
# @scope class
attach_function :string_userfree_utf16_free, :cef_string_userfree_utf16_free, [StringUtf16], :void
-
end
diff --git a/test/output/include/internal/cef_string_wrappers.rb b/test/output/include/internal/cef_string_wrappers.rb
index 36057e9..9fa7c99 100644
--- a/test/output/include/internal/cef_string_wrappers.rb
+++ b/test/output/include/internal/cef_string_wrappers.rb
@@ -1,69 +1,71 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Traits implementation for wide character strings.
- #
+
# = Fields:
# :char_type ::
- # (Integer)
+ # (Integer)
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :userfree_struct_type ::
- # (FFI::Pointer(StringUserfreeWide))
+ # (FFI::Pointer(StringUserfreeWide))
# :clear ::
- # (unknown)
+ # (error_unknown)
class CefStringTraitsWide < FFI::Struct
layout :char_type, :int,
:struct_type, :char,
:userfree_struct_type, :pointer,
:clear, :char
end
-
+
# Traits implementation for utf8 character strings.
- #
+
# = Fields:
# :char_type ::
- # (Integer)
+ # (Integer)
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :userfree_struct_type ::
- # (FFI::Pointer(StringUserfreeUtf8))
+ # (FFI::Pointer(StringUserfreeUtf8))
# :clear ::
- # (unknown)
+ # (error_unknown)
class CefStringTraitsUTF8 < FFI::Struct
layout :char_type, :char,
:struct_type, :char,
:userfree_struct_type, :pointer,
:clear, :char
end
-
+
# Traits implementation for utf16 character strings.
- #
+
# = Fields:
# :char_type ::
- # (Integer)
+ # (Integer)
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :userfree_struct_type ::
- # (FFI::Pointer(StringUserfreeUtf16))
+ # (FFI::Pointer(StringUserfreeUtf16))
# :clear ::
- # (unknown)
+ # (error_unknown)
class CefStringTraitsUTF16 < FFI::Struct
- layout :char_type, :ushort,
+ layout :char_type, :int,
:struct_type, :char,
:userfree_struct_type, :pointer,
:clear, :char
end
-
+
end
diff --git a/test/output/include/internal/cef_time.rb b/test/output/include/internal/cef_time.rb
index 530d538..7b742ad 100644
--- a/test/output/include/internal/cef_time.rb
+++ b/test/output/include/internal/cef_time.rb
@@ -1,19 +1,21 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Time information. Values should always be in UTC.
- #
+
# = Fields:
# :year ::
# (Integer) Four digit year "2007"
@@ -31,22 +33,7 @@ def self.attach_function(name, *_)
# (Integer) Second within the current minute (0-59 plus leap
# :millisecond ::
# (Integer) Milliseconds within the current second (0-999)
- module TimeWrappers
- # @param [FFI::Pointer(*Time)] time
- # @return [Integer]
- def to_timet(time)
- CEF.time_to_timet(self, time)
- end
-
- # @param [FFI::Pointer(*Double)] time
- # @return [Integer]
- def to_doublet(time)
- CEF.time_to_doublet(self, time)
- end
- end
-
class Time < FFI::Struct
- include TimeWrappers
layout :year, :int,
:month, :int,
:day_of_week, :int,
@@ -56,45 +43,41 @@ class Time < FFI::Struct
:second, :int,
:millisecond, :int
end
-
+
# Converts cef_time_t to/from time_t. Returns true (1) on success and false (0)
# on failure.
- #
+
# @method time_to_timet(time, time)
- # @param [Time] time
- # @param [FFI::Pointer(*Time)] time
- # @return [Integer]
+ # @param [FFI::Pointer(*Time)] time
+ # @param [FFI::Pointer(*Int)] time
+ # @return [Integer]
# @scope class
- attach_function :time_to_timet, :cef_time_to_timet, [Time, :pointer], :int
-
+ attach_function :time_to_timet, :cef_time_to_timet, [:pointer, :pointer], :int
# (Not documented)
- #
+
# @method time_from_timet(time, time)
- # @param [Integer] time
- # @param [Time] time
- # @return [Integer]
+ # @param [Integer] time
+ # @param [FFI::Pointer(*Time)] time
+ # @return [Integer]
# @scope class
- attach_function :time_from_timet, :cef_time_from_timet, [:long, Time], :int
-
+ attach_function :time_from_timet, :cef_time_from_timet, [:int, :pointer], :int
# Converts cef_time_t to/from a double which is the number of seconds since
# epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0
# means "not initialized". Returns true (1) on success and false (0) on
# failure.
- #
+
# @method time_to_doublet(time, time)
- # @param [Time] time
- # @param [FFI::Pointer(*Double)] time
- # @return [Integer]
+ # @param [FFI::Pointer(*Time)] time
+ # @param [FFI::Pointer(*Double)] time
+ # @return [Integer]
# @scope class
- attach_function :time_to_doublet, :cef_time_to_doublet, [Time, :pointer], :int
-
+ attach_function :time_to_doublet, :cef_time_to_doublet, [:pointer, :pointer], :int
# (Not documented)
- #
+
# @method time_from_doublet(time, time)
- # @param [Float] time
- # @param [Time] time
- # @return [Integer]
+ # @param [Float] time
+ # @param [FFI::Pointer(*Time)] time
+ # @return [Integer]
# @scope class
- attach_function :time_from_doublet, :cef_time_from_doublet, [:double, Time], :int
-
+ attach_function :time_from_doublet, :cef_time_from_doublet, [:double, :pointer], :int
end
diff --git a/test/output/include/internal/cef_tuple.rb b/test/output/include/internal/cef_tuple.rb
index eb3432e..ced27ad 100644
--- a/test/output/include/internal/cef_tuple.rb
+++ b/test/output/include/internal/cef_tuple.rb
@@ -1,37 +1,38 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# output (a "tier"). See MakeRefTuple and its usages.
- #
+
# = Fields:
# :value_tuple ::
- # (unknown)
+ # (error_unknown)
# :ref_tuple ::
- # (unknown)
+ # (error_unknown)
# :param_tuple ::
- # (unknown)
+ # (error_unknown)
class Tuple0 < FFI::Struct
layout :value_tuple, :char,
:ref_tuple, :char,
:param_tuple, :char
end
-
+
# argument types.
- #
+
# @method make_tuple()
- # @return [Tuple0]
+ # @return [Tuple0]
# @scope class
attach_function :make_tuple, :MakeTuple, [], Tuple0.by_value
-
end
diff --git a/test/output/include/internal/cef_types.rb b/test/output/include/internal/cef_types.rb
index dbfc7d8..d4ed357 100644
--- a/test/output/include/internal/cef_types.rb
+++ b/test/output/include/internal/cef_types.rb
@@ -1,35 +1,37 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Log severity levels.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:log_severity).
- #
+
# === Options:
# :logseverity_verbose ::
- #
+
# :logseverity_info ::
- #
+
# :logseverity_warning ::
- #
+
# :logseverity_error ::
- #
+
# :logseverity_error_report ::
- #
+
# :logseverity_disable ::
# Disables logging completely.
- #
+
# @method _enum_log_severity_
# @return [Symbol]
# @scope class
@@ -41,10 +43,10 @@ def self.attach_function(name, *_)
:logseverity_error_report, 3,
:logseverity_disable, 99
]
-
+
# Initialization settings. Specify NULL or 0 to get the recommended default
# values.
- #
+
# = Fields:
# :size ::
# (Integer) Size of this structure.
@@ -53,7 +55,7 @@ def self.attach_function(name, *_)
# run mode is not officially supported by Chromium and is less stable than
# the multi-process default.
# :browser_subprocess_path ::
- # (unknown) The path to a separate executable that will be launched for sub-processes.
+ # (error_unknown) The path to a separate executable that will be launched for sub-processes.
# By default the browser process executable is used. See the comments on
# CefExecuteProcess() for details.
# :multi_threaded_message_loop ::
@@ -66,42 +68,42 @@ def self.attach_function(name, *_)
# be specified using CEF data structures or via the
# CefApp::OnBeforeCommandLineProcessing() method.
# :cache_path ::
- # (unknown) The location where cache data will be stored on disk. If empty an in-memory
+ # (error_unknown) The location where cache data will be stored on disk. If empty an in-memory
# cache will be used. HTML5 databases such as localStorage will only persist
# across sessions if a cache path is specified.
# :user_agent ::
- # (unknown) Value that will be returned as the User-Agent HTTP header. If empty the
+ # (error_unknown) Value that will be returned as the User-Agent HTTP header. If empty the
# default User-Agent string will be used.
# :product_version ::
- # (unknown) Value that will be inserted as the product portion of the default
+ # (error_unknown) Value that will be inserted as the product portion of the default
# User-Agent string. If empty the Chromium product version will be used. If
# |userAgent| is specified this value will be ignored.
# :locale ::
- # (unknown) The locale string that will be passed to WebKit. If empty the default
+ # (error_unknown) The locale string that will be passed to WebKit. If empty the default
# locale of "en-US" will be used. This value is ignored on Linux where locale
# is determined using environment variable parsing with the precedence order:
# LANGUAGE, LC_ALL, LC_MESSAGES and LANG.
# :log_file ::
- # (unknown) The directory and file name to use for the debug log. If empty, the
+ # (error_unknown) The directory and file name to use for the debug log. If empty, the
# default name of "debug.log" will be used and the file will be written
# to the application directory.
# :log_severity ::
# (Symbol from _enum_log_severity_) The log severity. Only messages of this severity level or higher will be
# logged.
# :javascript_flags ::
- # (unknown) Custom flags that will be used when initializing the V8 JavaScript engine.
+ # (error_unknown) Custom flags that will be used when initializing the V8 JavaScript engine.
# The consequences of using custom flags may not be well tested.
# :auto_detect_proxy_settings_enabled ::
# (Integer) Set to true (1) to use the system proxy resolver on Windows when
# "Automatically detect settings" is checked. This setting is disabled
# by default for performance reasons.
# :pack_file_path ::
- # (unknown) The fully qualified path for the cef.pak file. If this value is empty
+ # (error_unknown) The fully qualified path for the cef.pak file. If this value is empty
# the cef.pak file must be located in the module directory. This value is
# ignored on Mac OS X where pack files are always loaded from the app bundle
# resource directory.
# :locales_dir_path ::
- # (unknown) The fully qualified path for the locales directory. If this value is empty
+ # (error_unknown) The fully qualified path for the locales directory. If this value is empty
# the locales directory must be located in the module directory. This value
# is ignored on Mac OS X where pack files are always loaded from the app
# bundle resource directory.
@@ -116,7 +118,7 @@ def self.attach_function(name, *_)
# will be http://localhost:8080. CEF can be remotely debugged from any CEF or
# Chrome browser window.
class Settings < FFI::Struct
- layout :size, :ulong,
+ layout :size, :int,
:single_process, :int,
:browser_subprocess_path, :char,
:multi_threaded_message_loop, :int,
@@ -134,38 +136,38 @@ class Settings < FFI::Struct
:pack_loading_disabled, :int,
:remote_debugging_port, :int
end
-
+
# Browser initialization settings. Specify NULL or 0 to get the recommended
# default values. The consequences of using custom values may not be well
# tested.
- #
+
# = Fields:
# :size ::
# (Integer) Size of this structure.
# :standard_font_family ::
- # (unknown) Font settings.
+ # (error_unknown) Font settings.
# :fixed_font_family ::
- # (unknown)
+ # (error_unknown)
# :serif_font_family ::
- # (unknown)
+ # (error_unknown)
# :sans_serif_font_family ::
- # (unknown)
+ # (error_unknown)
# :cursive_font_family ::
- # (unknown)
+ # (error_unknown)
# :fantasy_font_family ::
- # (unknown)
+ # (error_unknown)
# :default_font_size ::
- # (Integer)
+ # (Integer)
# :default_fixed_font_size ::
- # (Integer)
+ # (Integer)
# :minimum_font_size ::
- # (Integer)
+ # (Integer)
# :minimum_logical_font_size ::
- # (Integer)
+ # (Integer)
# :remote_fonts_disabled ::
# (Integer) Set to true (1) to disable loading of fonts from remote sources.
# :default_encoding ::
- # (unknown) Default encoding for Web content. If empty "ISO-8859-1" will be used.
+ # (error_unknown) Default encoding for Web content. If empty "ISO-8859-1" will be used.
# :encoding_detector_enabled ::
# (Integer) Set to true (1) to attempt automatic detection of content encoding.
# :javascript_disabled ::
@@ -212,7 +214,7 @@ class Settings < FFI::Struct
# :user_style_sheet_enabled ::
# (Integer) Set to true (1) to enable the user style sheet for all pages.
# :user_style_sheet_location ::
- # (unknown) Location of the user style sheet. This must be a data URL of the form
+ # (error_unknown) Location of the user style sheet. This must be a data URL of the form
# "data:text/css;charset=utf-8;base64,csscontent" where "csscontent" is the
# base64 encoded contents of the CSS file.
# :author_and_user_styles_disabled ::
@@ -245,7 +247,7 @@ class Settings < FFI::Struct
# :fullscreen_enabled ::
# (Integer) Set to true (1) to enable fullscreen mode.
class BrowserSettings < FFI::Struct
- layout :size, :ulong,
+ layout :size, :int,
:standard_font_family, :char,
:fixed_font_family, :char,
:serif_font_family, :char,
@@ -295,27 +297,27 @@ class BrowserSettings < FFI::Struct
:developer_tools_disabled, :int,
:fullscreen_enabled, :int
end
-
+
# URL component parts.
- #
+
# = Fields:
# :spec ::
- # (unknown) The complete URL specification.
+ # (error_unknown) The complete URL specification.
# :scheme ::
- # (unknown) Scheme component not including the colon (e.g., "http").
+ # (error_unknown) Scheme component not including the colon (e.g., "http").
# :username ::
- # (unknown) User name component.
+ # (error_unknown) User name component.
# :password ::
- # (unknown) Password component.
+ # (error_unknown) Password component.
# :host ::
- # (unknown) Host component. This may be a hostname, an IPv4 address or an IPv6 literal
+ # (error_unknown) Host component. This may be a hostname, an IPv4 address or an IPv6 literal
# surrounded by square brackets (e.g., "(2001:db8::1)").
# :port ::
- # (unknown) Port number component.
+ # (error_unknown) Port number component.
# :path ::
- # (unknown) Path component including the first slash following the host.
+ # (error_unknown) Path component including the first slash following the host.
# :query ::
- # (unknown) Query string component (i.e., everything following the '?').
+ # (error_unknown) Query string component (i.e., everything following the '?').
class Urlparts < FFI::Struct
layout :spec, :char,
:scheme, :char,
@@ -326,35 +328,35 @@ class Urlparts < FFI::Struct
:path, :char,
:query, :char
end
-
+
# Cookie information.
- #
+
# = Fields:
# :name ::
- # (unknown) The cookie name.
+ # (error_unknown) The cookie name.
# :value ::
- # (unknown) The cookie value.
+ # (error_unknown) The cookie value.
# :domain ::
- # (unknown) If |domain| is empty a host cookie will be created instead of a domain
+ # (error_unknown) If |domain| is empty a host cookie will be created instead of a domain
# cookie. Domain cookies are stored with a leading "." and are visible to
# sub-domains whereas host cookies are not.
# :path ::
- # (unknown) If |path| is non-empty only URLs at or below the path will get the cookie
+ # (error_unknown) If |path| is non-empty only URLs at or below the path will get the cookie
# value.
# :secure ::
# (Integer) If |secure| is true the cookie will only be sent for HTTPS requests.
# :httponly ::
# (Integer) If |httponly| is true the cookie will only be sent for HTTP requests.
# :creation ::
- # (unknown) The cookie creation date. This is automatically populated by the system on
+ # (Integer) The cookie creation date. This is automatically populated by the system on
# cookie creation.
# :last_access ::
- # (unknown) The cookie last access date. This is automatically populated by the system
+ # (Integer) The cookie last access date. This is automatically populated by the system
# on access.
# :has_expires ::
# (Integer) The cookie expiration date is only valid if |has_expires| is true.
# :expires ::
- # (unknown)
+ # (Integer)
class Cookie < FFI::Struct
layout :name, :char,
:value, :char,
@@ -362,22 +364,22 @@ class Cookie < FFI::Struct
:path, :char,
:secure, :int,
:httponly, :int,
- :creation, :char,
- :last_access, :char,
+ :creation, :int,
+ :last_access, :int,
:has_expires, :int,
- :expires, :char
+ :expires, :int
end
-
+
# Storage types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:storage_type).
- #
+
# === Options:
# :st_localstorage ::
- #
+
# :st_sessionstorage ::
- #
- #
+
+
# @method _enum_storage_type_
# @return [Symbol]
# @scope class
@@ -385,112 +387,112 @@ class Cookie < FFI::Struct
:st_localstorage, 0,
:st_sessionstorage, 1
]
-
+
# Supported error code values. See net\base\net_error_list.h for complete
# descriptions of the error codes.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:errorcode).
- #
+
# === Options:
# :err_none ::
- #
+
# :err_failed ::
- #
+
# :err_aborted ::
- #
+
# :err_invalid_argument ::
- #
+
# :err_invalid_handle ::
- #
+
# :err_file_not_found ::
- #
+
# :err_timed_out ::
- #
+
# :err_file_too_big ::
- #
+
# :err_unexpected ::
- #
+
# :err_access_denied ::
- #
+
# :err_not_implemented ::
- #
+
# :err_connection_closed ::
- #
+
# :err_connection_reset ::
- #
+
# :err_connection_refused ::
- #
+
# :err_connection_aborted ::
- #
+
# :err_connection_failed ::
- #
+
# :err_name_not_resolved ::
- #
+
# :err_internet_disconnected ::
- #
+
# :err_ssl_protocol_error ::
- #
+
# :err_address_invalid ::
- #
+
# :err_address_unreachable ::
- #
+
# :err_ssl_client_auth_cert_needed ::
- #
+
# :err_tunnel_connection_failed ::
- #
+
# :err_no_ssl_versions_enabled ::
- #
+
# :err_ssl_version_or_cipher_mismatch ::
- #
+
# :err_ssl_renegotiation_requested ::
- #
+
# :err_cert_common_name_invalid ::
- #
+
# :err_cert_date_invalid ::
- #
+
# :err_cert_authority_invalid ::
- #
+
# :err_cert_contains_errors ::
- #
+
# :err_cert_no_revocation_mechanism ::
- #
+
# :err_cert_unable_to_check_revocation ::
- #
+
# :err_cert_revoked ::
- #
+
# :err_cert_invalid ::
- #
+
# :err_cert_end ::
- #
+
# :err_invalid_url ::
- #
+
# :err_disallowed_url_scheme ::
- #
+
# :err_unknown_url_scheme ::
- #
+
# :err_too_many_redirects ::
- #
+
# :err_unsafe_redirect ::
- #
+
# :err_unsafe_port ::
- #
+
# :err_invalid_response ::
- #
+
# :err_invalid_chunked_encoding ::
- #
+
# :err_method_not_supported ::
- #
+
# :err_unexpected_proxy_auth ::
- #
+
# :err_empty_response ::
- #
+
# :err_response_headers_too_big ::
- #
+
# :err_cache_miss ::
- #
+
# :err_insecure_response ::
- #
- #
+
+
# @method _enum_errorcode_
# @return [Symbol]
# @scope class
@@ -545,21 +547,21 @@ class Cookie < FFI::Struct
:err_cache_miss, -400,
:err_insecure_response, -501
]
-
+
# V8 access control values.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:v8_accesscontrol).
- #
+
# === Options:
# :access_control_default ::
- #
+
# :access_control_all_can_read ::
- #
+
# :access_control_all_can_write ::
- #
+
# :access_control_prohibits_overwriting ::
- #
- #
+
+
# @method _enum_v8_accesscontrol_
# @return [Symbol]
# @scope class
@@ -569,21 +571,21 @@ class Cookie < FFI::Struct
:access_control_all_can_write, 2,
:access_control_prohibits_overwriting, 4
]
-
+
# V8 property attribute values.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:v8_propertyattribute).
- #
+
# === Options:
# :property_attribute_none ::
- #
+
# :property_attribute_readonly ::
# Configurable
# :property_attribute_dontenum ::
# Not writeable
# :property_attribute_dontdelete ::
# Not enumerable
- #
+
# @method _enum_v8_propertyattribute_
# @return [Symbol]
# @scope class
@@ -593,19 +595,19 @@ class Cookie < FFI::Struct
:property_attribute_dontenum, 2,
:property_attribute_dontdelete, 4
]
-
+
# Post data elements may represent either bytes or files.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:postdataelement_type).
- #
+
# === Options:
# :pde_type_empty ::
- #
+
# :pde_type_bytes ::
- #
+
# :pde_type_file ::
- #
- #
+
+
# @method _enum_postdataelement_type_
# @return [Symbol]
# @scope class
@@ -614,11 +616,11 @@ class Cookie < FFI::Struct
:pde_type_bytes, 1,
:pde_type_file, 2
]
-
+
# Flags used to customize the behavior of CefURLRequest.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:urlrequest_flags).
- #
+
# === Options:
# :ur_flag_none ::
# Default behavior.
@@ -641,7 +643,7 @@ class Cookie < FFI::Struct
# If set 5XX redirect errors will be propagated to the observer instead of
# automatically re-tried. This currently only applies for requests
# originated in the browser process.
- #
+
# @method _enum_urlrequest_flags_
# @return [Symbol]
# @scope class
@@ -656,11 +658,11 @@ class Cookie < FFI::Struct
:ur_flag_no_download_data, 64,
:ur_flag_no_retry_on_5xx, 128
]
-
+
# Flags that represent CefURLRequest status.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:urlrequest_status).
- #
+
# === Options:
# :ur_unknown ::
# Unknown status.
@@ -677,7 +679,7 @@ class Cookie < FFI::Struct
# Request was canceled programatically.
# :ur_failed ::
# Request failed for some reason.
- #
+
# @method _enum_urlrequest_status_
# @return [Symbol]
# @scope class
@@ -689,35 +691,35 @@ class Cookie < FFI::Struct
:ur_canceled, 4,
:ur_failed, 5
]
-
+
# Structure representing a rectangle.
- #
+
# = Fields:
# :x ::
- # (Integer)
+ # (Integer)
# :y ::
- # (Integer)
+ # (Integer)
# :width ::
- # (Integer)
+ # (Integer)
# :height ::
- # (Integer)
+ # (Integer)
class Rect < FFI::Struct
layout :x, :int,
:y, :int,
:width, :int,
:height, :int
end
-
+
# Existing process IDs.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:process_id).
- #
+
# === Options:
# :pid_browser ::
# Browser process.
# :pid_renderer ::
# Renderer process.
- #
+
# @method _enum_process_id_
# @return [Symbol]
# @scope class
@@ -725,11 +727,11 @@ class Rect < FFI::Struct
:pid_browser, 0,
:pid_renderer, 1
]
-
+
# Existing thread IDs.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:thread_id).
- #
+
# === Options:
# :tid_ui ::
# The main thread in the browser. This will be the same as the main
@@ -750,7 +752,7 @@ class Rect < FFI::Struct
# Used to process IPC and network messages.
# :tid_renderer ::
# The main thread in the renderer. Used for all WebKit and V8 interaction.
- #
+
# @method _enum_thread_id_
# @return [Symbol]
# @scope class
@@ -764,31 +766,31 @@ class Rect < FFI::Struct
:tid_io, 6,
:tid_renderer, 7
]
-
+
# Supported value types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:value_type).
- #
+
# === Options:
# :vtype_invalid ::
- #
+
# :vtype_null ::
- #
+
# :vtype_bool ::
- #
+
# :vtype_int ::
- #
+
# :vtype_double ::
- #
+
# :vtype_string ::
- #
+
# :vtype_binary ::
- #
+
# :vtype_dictionary ::
- #
+
# :vtype_list ::
- #
- #
+
+
# @method _enum_value_type_
# @return [Symbol]
# @scope class
@@ -803,19 +805,19 @@ class Rect < FFI::Struct
:vtype_dictionary, 7,
:vtype_list, 8
]
-
+
# Supported JavaScript dialog types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:jsdialog_type).
- #
+
# === Options:
# :jsdialogtype_alert ::
- #
+
# :jsdialogtype_confirm ::
- #
+
# :jsdialogtype_prompt ::
- #
- #
+
+
# @method _enum_jsdialog_type_
# @return [Symbol]
# @scope class
@@ -824,48 +826,48 @@ class Rect < FFI::Struct
:jsdialogtype_confirm, 1,
:jsdialogtype_prompt, 2
]
-
+
# Supported menu IDs. Non-English translations can be provided for the
# IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString().
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:menu_id).
- #
+
# === Options:
# :back ::
# Navigation.
# :forward ::
- #
+
# :reload ::
- #
+
# :reload_nocache ::
- #
+
# :stopload ::
- #
+
# :undo ::
# Editing.
# :redo_ ::
- #
+
# :cut ::
- #
+
# :copy ::
- #
+
# :paste ::
- #
+
# :delete ::
- #
+
# :select_all ::
- #
+
# :find ::
# Miscellaneous.
# :print ::
- #
+
# :view_source ::
- #
+
# :user_first ::
# defined in the tools/gritsettings/resource_ids file.
# :user_last ::
- #
- #
+
+
# @method _enum_menu_id_
# @return [Symbol]
# @scope class
@@ -888,33 +890,33 @@ class Rect < FFI::Struct
:user_first, 26500,
:user_last, 28500
]
-
+
# Supported event bit flags.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:event_flags).
- #
+
# === Options:
# :eventflag_none ::
- #
+
# :eventflag_caps_lock_down ::
- #
+
# :eventflag_shift_down ::
- #
+
# :eventflag_control_down ::
- #
+
# :eventflag_alt_down ::
- #
+
# :eventflag_left_mouse_button ::
- #
+
# :eventflag_middle_mouse_button ::
- #
+
# :eventflag_right_mouse_button ::
- #
+
# :eventflag_command_down ::
# Mac OS-X command key.
# :eventflag_extended ::
# Windows extended key (see WM_KEYDOWN doc).
- #
+
# @method _enum_event_flags_
# @return [Symbol]
# @scope class
@@ -930,25 +932,25 @@ class Rect < FFI::Struct
:eventflag_command_down, 128,
:eventflag_extended, 256
]
-
+
# Supported menu item types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:menu_item_type).
- #
+
# === Options:
# :menuitemtype_none ::
- #
+
# :menuitemtype_command ::
- #
+
# :menuitemtype_check ::
- #
+
# :menuitemtype_radio ::
- #
+
# :menuitemtype_separator ::
- #
+
# :menuitemtype_submenu ::
- #
- #
+
+
# @method _enum_menu_item_type_
# @return [Symbol]
# @scope class
@@ -960,11 +962,11 @@ class Rect < FFI::Struct
:menuitemtype_separator, 4,
:menuitemtype_submenu, 5
]
-
+
# Supported context menu type flags.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:context_menu_type_flags).
- #
+
# === Options:
# :cm_typeflag_none ::
# No node is selected.
@@ -980,7 +982,7 @@ class Rect < FFI::Struct
# There is a textual or mixed selection that is selected.
# :cm_typeflag_editable ::
# An editable element is selected.
- #
+
# @method _enum_context_menu_type_flags_
# @return [Symbol]
# @scope class
@@ -993,11 +995,11 @@ class Rect < FFI::Struct
:cm_typeflag_selection, 16,
:cm_typeflag_editable, 32
]
-
+
# Supported context menu media types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:context_menu_media_type).
- #
+
# === Options:
# :cm_mediatype_none ::
# No special node is in context.
@@ -1011,7 +1013,7 @@ class Rect < FFI::Struct
# A file node is selected.
# :cm_mediatype_plugin ::
# A plugin node is selected.
- #
+
# @method _enum_context_menu_media_type_
# @return [Symbol]
# @scope class
@@ -1023,35 +1025,35 @@ class Rect < FFI::Struct
:cm_mediatype_file, 4,
:cm_mediatype_plugin, 5
]
-
+
# Supported context menu media state bit flags.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:context_menu_media_state_flags).
- #
+
# === Options:
# :cm_mediaflag_none ::
- #
+
# :cm_mediaflag_error ::
- #
+
# :cm_mediaflag_paused ::
- #
+
# :cm_mediaflag_muted ::
- #
+
# :cm_mediaflag_loop ::
- #
+
# :cm_mediaflag_can_save ::
- #
+
# :cm_mediaflag_has_audio ::
- #
+
# :cm_mediaflag_has_video ::
- #
+
# :cm_mediaflag_control_root_element ::
- #
+
# :cm_mediaflag_can_print ::
- #
+
# :cm_mediaflag_can_rotate ::
- #
- #
+
+
# @method _enum_context_menu_media_state_flags_
# @return [Symbol]
# @scope class
@@ -1068,31 +1070,31 @@ class Rect < FFI::Struct
:cm_mediaflag_can_print, 256,
:cm_mediaflag_can_rotate, 512
]
-
+
# Supported context menu edit state bit flags.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:context_menu_edit_state_flags).
- #
+
# === Options:
# :cm_editflag_none ::
- #
+
# :cm_editflag_can_undo ::
- #
+
# :cm_editflag_can_redo ::
- #
+
# :cm_editflag_can_cut ::
- #
+
# :cm_editflag_can_copy ::
- #
+
# :cm_editflag_can_paste ::
- #
+
# :cm_editflag_can_delete ::
- #
+
# :cm_editflag_can_select_all ::
- #
+
# :cm_editflag_can_translate ::
- #
- #
+
+
# @method _enum_context_menu_edit_state_flags_
# @return [Symbol]
# @scope class
@@ -1107,21 +1109,21 @@ class Rect < FFI::Struct
:cm_editflag_can_select_all, 64,
:cm_editflag_can_translate, 128
]
-
+
# Key event types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:key_event_type).
- #
+
# === Options:
# :keyevent_rawkeydown ::
- #
+
# :keyevent_keydown ::
- #
+
# :keyevent_keyup ::
- #
+
# :keyevent_char ::
- #
- #
+
+
# @method _enum_key_event_type_
# @return [Symbol]
# @scope class
@@ -1131,23 +1133,23 @@ class Rect < FFI::Struct
:keyevent_keyup, 2,
:keyevent_char, 3
]
-
+
# Key event modifiers.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:key_event_modifiers).
- #
+
# === Options:
# :shift ::
- #
+
# :ctrl ::
- #
+
# :alt ::
- #
+
# :meta ::
- #
+
# :keypad ::
- #
- #
+
+
# @method _enum_key_event_modifiers_
# @return [Symbol]
# @scope class
@@ -1158,9 +1160,9 @@ class Rect < FFI::Struct
:meta, 8,
:keypad, 16
]
-
+
# Structure representing keyboard event information.
- #
+
# = Fields:
# :type ::
# (Symbol from _enum_key_event_type_) The type of keyboard event.
@@ -1196,17 +1198,17 @@ class KeyEvent < FFI::Struct
:unmodified_character, :ushort,
:focus_on_editable_field, :int
end
-
+
# Focus sources.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:focus_source).
- #
+
# === Options:
# :navigation ::
# The source is explicit navigation via the API (LoadURL(), etc).
# :system ::
# The source is a system-generated focus event.
- #
+
# @method _enum_focus_source_
# @return [Symbol]
# @scope class
@@ -1214,26 +1216,26 @@ class KeyEvent < FFI::Struct
:navigation, 0,
:system, 1
]
-
+
# Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and
# UTF16 (LE and BE) by default. All other types must be translated to UTF8
# before being passed to the parser. If a BOM is detected and the correct
# decoder is available then that decoder will be used automatically.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:xml_encoding_type).
- #
+
# === Options:
# :none ::
- #
+
# :utf8 ::
- #
+
# :utf16le ::
- #
+
# :utf16be ::
- #
+
# :ascii ::
- #
- #
+
+
# @method _enum_xml_encoding_type_
# @return [Symbol]
# @scope class
@@ -1244,35 +1246,35 @@ class KeyEvent < FFI::Struct
:utf16be, 3,
:ascii, 4
]
-
+
# XML node types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:xml_node_type).
- #
+
# === Options:
# :unsupported ::
- #
+
# :processing_instruction ::
- #
+
# :document_type ::
- #
+
# :element_start ::
- #
+
# :element_end ::
- #
+
# :attribute ::
- #
+
# :text ::
- #
+
# :cdata ::
- #
+
# :entity_reference ::
- #
+
# :whitespace ::
- #
+
# :comment ::
- #
- #
+
+
# @method _enum_xml_node_type_
# @return [Symbol]
# @scope class
@@ -1289,19 +1291,19 @@ class KeyEvent < FFI::Struct
:whitespace, 9,
:comment, 10
]
-
+
# Status message types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:handler_statustype).
- #
+
# === Options:
# :text ::
- #
+
# :mouseover_url ::
- #
+
# :keyboard_focus_url ::
- #
- #
+
+
# @method _enum_handler_statustype_
# @return [Symbol]
# @scope class
@@ -1310,44 +1312,44 @@ class KeyEvent < FFI::Struct
:mouseover_url, 1,
:keyboard_focus_url, 2
]
-
+
# Popup window features.
- #
+
# = Fields:
# :x ::
- # (Integer)
+ # (Integer)
# :x_set ::
- # (Integer)
+ # (Integer)
# :y ::
- # (Integer)
+ # (Integer)
# :y_set ::
- # (Integer)
+ # (Integer)
# :width ::
- # (Integer)
+ # (Integer)
# :width_set ::
- # (Integer)
+ # (Integer)
# :height ::
- # (Integer)
+ # (Integer)
# :height_set ::
- # (Integer)
+ # (Integer)
# :menu_bar_visible ::
- # (Integer)
+ # (Integer)
# :status_bar_visible ::
- # (Integer)
+ # (Integer)
# :tool_bar_visible ::
- # (Integer)
+ # (Integer)
# :location_bar_visible ::
- # (Integer)
+ # (Integer)
# :scrollbars_visible ::
- # (Integer)
+ # (Integer)
# :resizable ::
- # (Integer)
+ # (Integer)
# :fullscreen ::
- # (Integer)
+ # (Integer)
# :dialog ::
- # (Integer)
+ # (Integer)
# :additional_features ::
- # (FFI::Pointer(StringList))
+ # (FFI::Pointer(StringList))
class PopupFeatures < FFI::Struct
layout :x, :int,
:x_set, :int,
@@ -1367,19 +1369,19 @@ class PopupFeatures < FFI::Struct
:dialog, :int,
:additional_features, :pointer
end
-
+
# Proxy types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:proxy_type).
- #
+
# === Options:
# :direct ::
- #
+
# :named ::
- #
+
# :pac_string ::
- #
- #
+
+
# @method _enum_proxy_type_
# @return [Symbol]
# @scope class
@@ -1388,33 +1390,33 @@ class PopupFeatures < FFI::Struct
:named, 1,
:pac_string, 2
]
-
+
# Proxy information.
- #
+
# = Fields:
# :proxy_type ::
- # (Symbol from _enum_proxy_type_)
+ # (Symbol from _enum_proxy_type_)
# :proxy_list ::
- # (unknown)
+ # (error_unknown)
class ProxyInfo < FFI::Struct
layout :proxy_type, :proxy_type,
:proxy_list, :char
end
-
+
# DOM document types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dom_document_type).
- #
+
# === Options:
# :unknown ::
- #
+
# :html ::
- #
+
# :xhtml ::
- #
+
# :plugin ::
- #
- #
+
+
# @method _enum_dom_document_type_
# @return [Symbol]
# @scope class
@@ -1424,53 +1426,53 @@ class ProxyInfo < FFI::Struct
:xhtml, 2,
:plugin, 3
]
-
+
# DOM event category flags.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dom_event_category).
- #
+
# === Options:
# :unknown ::
- #
+
# :ui ::
- #
+
# :mouse ::
- #
+
# :mutation ::
- #
+
# :keyboard ::
- #
+
# :text ::
- #
+
# :composition ::
- #
+
# :drag ::
- #
+
# :clipboard ::
- #
+
# :message ::
- #
+
# :wheel ::
- #
+
# :before_text_inserted ::
- #
+
# :overflow ::
- #
+
# :page_transition ::
- #
+
# :popstate ::
- #
+
# :progress ::
- #
+
# :xmlhttprequest_progress ::
- #
+
# :webkit_animation ::
- #
+
# :webkit_transition ::
- #
+
# :before_load ::
- #
- #
+
+
# @method _enum_dom_event_category_
# @return [Symbol]
# @scope class
@@ -1496,21 +1498,21 @@ class ProxyInfo < FFI::Struct
:webkit_transition, 131072,
:before_load, 262144
]
-
+
# DOM event processing phases.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dom_event_phase).
- #
+
# === Options:
# :unknown ::
- #
+
# :capturing ::
- #
+
# :at_target ::
- #
+
# :bubbling ::
- #
- #
+
+
# @method _enum_dom_event_phase_
# @return [Symbol]
# @scope class
@@ -1520,41 +1522,41 @@ class ProxyInfo < FFI::Struct
:at_target, 2,
:bubbling, 3
]
-
+
# DOM node types.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dom_node_type).
- #
+
# === Options:
# :unsupported ::
- #
+
# :element ::
- #
+
# :attribute ::
- #
+
# :text ::
- #
+
# :cdata_section ::
- #
+
# :entity_reference ::
- #
+
# :entity ::
- #
+
# :processing_instructions ::
- #
+
# :comment ::
- #
+
# :document ::
- #
+
# :document_type ::
- #
+
# :document_fragment ::
- #
+
# :notation ::
- #
+
# :xpath_namespace ::
- #
- #
+
+
# @method _enum_dom_node_type_
# @return [Symbol]
# @scope class
@@ -1574,5 +1576,5 @@ class ProxyInfo < FFI::Struct
:notation, 12,
:xpath_namespace, 13
]
-
+
end
diff --git a/test/output/include/internal/cef_types_linux.rb b/test/output/include/internal/cef_types_linux.rb
index 1e5e295..d62c2c4 100644
--- a/test/output/include/internal/cef_types_linux.rb
+++ b/test/output/include/internal/cef_types_linux.rb
@@ -1,39 +1,41 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Structure representing CefExecuteProcess arguments.
- #
+
# = Fields:
# :argc ::
- # (Integer)
+ # (Integer)
# :argv ::
- # (FFI::Pointer(**CharS))
+ # (FFI::Pointer(**CharS))
class MainArgs < FFI::Struct
layout :argc, :int,
:argv, :pointer
end
-
+
# Class representing window information.
- #
+
# = Fields:
# :parent_widget ::
- # (FFI::Pointer(*Int))
+ # (FFI::Pointer(*Int))
# :widget ::
- # (FFI::Pointer(*Int))
+ # (FFI::Pointer(*Int))
class WindowInfo < FFI::Struct
layout :parent_widget, :pointer,
:widget, :pointer
end
-
+
end
diff --git a/test/output/include/internal/cef_types_mac.rb b/test/output/include/internal/cef_types_mac.rb
index 46caee6..f69421e 100644
--- a/test/output/include/internal/cef_types_mac.rb
+++ b/test/output/include/internal/cef_types_mac.rb
@@ -1,15 +1,17 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
end
diff --git a/test/output/include/internal/cef_types_win.rb b/test/output/include/internal/cef_types_win.rb
index 46caee6..f69421e 100644
--- a/test/output/include/internal/cef_types_win.rb
+++ b/test/output/include/internal/cef_types_win.rb
@@ -1,15 +1,17 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
end
diff --git a/test/output/include/internal/cef_types_wrappers.rb b/test/output/include/internal/cef_types_wrappers.rb
index e532b37..24b18f3 100644
--- a/test/output/include/internal/cef_types_wrappers.rb
+++ b/test/output/include/internal/cef_types_wrappers.rb
@@ -1,112 +1,114 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Set this object's values. If |copy| is true the source structure's values
# will be copied instead of referenced.
- #
+
# = Fields:
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :init ::
- # (unknown)
+ # (error_unknown)
class CefRectTraits < FFI::Struct
layout :struct_type, :char,
:init, :char
end
-
+
# Class representing a a keyboard event.
- #
+
# = Fields:
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :init ::
- # (unknown)
+ # (error_unknown)
class CefPopupFeaturesTraits < FFI::Struct
layout :struct_type, :char,
:init, :char
end
-
+
# Class representing popup window features.
- #
+
# = Fields:
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :init ::
- # (unknown)
+ # (error_unknown)
class CefSettingsTraits < FFI::Struct
layout :struct_type, :char,
:init, :char
end
-
+
# Class representing initialization settings.
- #
+
# = Fields:
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :init ::
- # (unknown)
+ # (error_unknown)
class CefBrowserSettingsTraits < FFI::Struct
layout :struct_type, :char,
:init, :char
end
-
+
# Class representing browser initialization settings.
- #
+
# = Fields:
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :init ::
- # (unknown)
+ # (error_unknown)
class CefURLPartsTraits < FFI::Struct
layout :struct_type, :char,
:init, :char
end
-
+
# Class representing a URL's component parts.
- #
+
# = Fields:
# :struct_type ::
- # (unknown)
+ # (Integer)
# :init ::
- # (unknown)
+ # (error_unknown)
class CefTimeTraits < FFI::Struct
- layout :struct_type, :char,
+ layout :struct_type, :int,
:init, :char
end
-
+
# means "not initialized".
- #
+
# = Fields:
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :init ::
- # (unknown)
+ # (error_unknown)
class CefCookieTraits < FFI::Struct
layout :struct_type, :char,
:init, :char
end
-
+
# Class representing a cookie.
- #
+
# = Fields:
# :struct_type ::
- # (unknown)
+ # (error_unknown)
# :init ::
- # (unknown)
+ # (error_unknown)
class CefProxyInfoTraits < FFI::Struct
layout :struct_type, :char,
:init, :char
end
-
+
end
diff --git a/test/output/include/internal/cef_win.rb b/test/output/include/internal/cef_win.rb
index 46caee6..f69421e 100644
--- a/test/output/include/internal/cef_win.rb
+++ b/test/output/include/internal/cef_win.rb
@@ -1,15 +1,17 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module CEF
+
extend FFI::Library
- ffi_lib 'cef'
-
+
+ ffi_lib ENV["CEF_PATH"] || "cef"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
end
diff --git a/test/output/libssh2.rb b/test/output/libssh2.rb
index eb5093e..893f300 100644
--- a/test/output/libssh2.rb
+++ b/test/output/libssh2.rb
@@ -1,489 +1,491 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LibSSH2
+
extend FFI::Library
- ffi_lib 'libssh2'
-
+
+ ffi_lib ENV["LIBSSH2_PATH"] || "libssh2"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
H = 1
-
+
COPYRIGHT = "2004-2010 The libssh2 project and its contributors."
-
+
VERSION = "1.2.8"
-
+
VERSION_MAJOR = 1
-
+
VERSION_MINOR = 2
-
+
VERSION_PATCH = 8
-
+
VERSION_NUM = 0x010208
-
+
TIMESTAMP = "Tue Apr 5 17:15:42 UTC 2011"
-
+
INVALID_SOCKET = -1
-
+
DH_GEX_MINGROUP = 1024
-
+
DH_GEX_OPTGROUP = 1536
-
+
DH_GEX_MAXGROUP = 2048
-
+
TERM_WIDTH = 80
-
+
TERM_HEIGHT = 24
-
+
TERM_WIDTH_PX = 0
-
+
TERM_HEIGHT_PX = 0
-
+
SOCKET_POLL_UDELAY = 250000
-
+
SOCKET_POLL_MAXLOOPS = 120
-
+
PACKET_MAXCOMP = 32000
-
+
PACKET_MAXDECOMP = 40000
-
+
PACKET_MAXPAYLOAD = 40000
-
+
CALLBACK_IGNORE = 0
-
+
CALLBACK_DEBUG = 1
-
+
CALLBACK_DISCONNECT = 2
-
+
CALLBACK_MACERROR = 3
-
+
CALLBACK_X11 = 4
-
+
METHOD_KEX = 0
-
+
METHOD_HOSTKEY = 1
-
+
METHOD_CRYPT_CS = 2
-
+
METHOD_CRYPT_SC = 3
-
+
METHOD_MAC_CS = 4
-
+
METHOD_MAC_SC = 5
-
+
METHOD_COMP_CS = 6
-
+
METHOD_COMP_SC = 7
-
+
METHOD_LANG_CS = 8
-
+
METHOD_LANG_SC = 9
-
+
FLAG_SIGPIPE = 1
-
+
FLAG_COMPRESS = 2
-
+
POLLFD_SOCKET = 1
-
+
POLLFD_CHANNEL = 2
-
+
POLLFD_LISTENER = 3
-
+
POLLFD_POLLIN = 0x0001
-
+
POLLFD_POLLPRI = 0x0002
-
+
POLLFD_POLLEXT = 0x0002
-
+
POLLFD_POLLOUT = 0x0004
-
+
POLLFD_POLLERR = 0x0008
-
+
POLLFD_POLLHUP = 0x0010
-
+
POLLFD_SESSION_CLOSED = 0x0010
-
+
POLLFD_POLLNVAL = 0x0020
-
+
POLLFD_POLLEX = 0x0040
-
+
POLLFD_CHANNEL_CLOSED = 0x0080
-
+
POLLFD_LISTENER_CLOSED = 0x0080
-
+
SESSION_BLOCK_INBOUND = 0x0001
-
+
SESSION_BLOCK_OUTBOUND = 0x0002
-
+
HOSTKEY_HASH_MD5 = 1
-
+
HOSTKEY_HASH_SHA1 = 2
-
+
HOSTKEY_TYPE_UNKNOWN = 0
-
+
HOSTKEY_TYPE_RSA = 1
-
+
HOSTKEY_TYPE_DSS = 2
-
+
SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT = 1
-
+
SSH_DISCONNECT_PROTOCOL_ERROR = 2
-
+
SSH_DISCONNECT_KEY_EXCHANGE_FAILED = 3
-
+
SSH_DISCONNECT_RESERVED = 4
-
+
SSH_DISCONNECT_MAC_ERROR = 5
-
+
SSH_DISCONNECT_COMPRESSION_ERROR = 6
-
+
SSH_DISCONNECT_SERVICE_NOT_AVAILABLE = 7
-
+
SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED = 8
-
+
SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE = 9
-
+
SSH_DISCONNECT_CONNECTION_LOST = 10
-
+
SSH_DISCONNECT_BY_APPLICATION = 11
-
+
SSH_DISCONNECT_TOO_MANY_CONNECTIONS = 12
-
+
SSH_DISCONNECT_AUTH_CANCELLED_BY_USER = 13
-
+
SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE = 14
-
+
SSH_DISCONNECT_ILLEGAL_USER_NAME = 15
-
+
ERROR_NONE = 0
-
+
ERROR_SOCKET_NONE = -1
-
+
ERROR_BANNER_RECV = -2
-
+
ERROR_BANNER_SEND = -3
-
+
ERROR_INVALID_MAC = -4
-
+
ERROR_KEX_FAILURE = -5
-
+
ERROR_ALLOC = -6
-
+
ERROR_SOCKET_SEND = -7
-
+
ERROR_KEY_EXCHANGE_FAILURE = -8
-
+
ERROR_TIMEOUT = -9
-
+
ERROR_HOSTKEY_INIT = -10
-
+
ERROR_HOSTKEY_SIGN = -11
-
+
ERROR_DECRYPT = -12
-
+
ERROR_SOCKET_DISCONNECT = -13
-
+
ERROR_PROTO = -14
-
+
ERROR_PASSWORD_EXPIRED = -15
-
+
ERROR_FILE = -16
-
+
ERROR_METHOD_NONE = -17
-
+
ERROR_AUTHENTICATION_FAILED = -18
-
+
ERROR_PUBLICKEY_UNVERIFIED = -19
-
+
ERROR_CHANNEL_OUTOFORDER = -20
-
+
ERROR_CHANNEL_FAILURE = -21
-
+
ERROR_CHANNEL_REQUEST_DENIED = -22
-
+
ERROR_CHANNEL_UNKNOWN = -23
-
+
ERROR_CHANNEL_WINDOW_EXCEEDED = -24
-
+
ERROR_CHANNEL_PACKET_EXCEEDED = -25
-
+
ERROR_CHANNEL_CLOSED = -26
-
+
ERROR_CHANNEL_EOF_SENT = -27
-
+
ERROR_SCP_PROTOCOL = -28
-
+
ERROR_ZLIB = -29
-
+
ERROR_SOCKET_TIMEOUT = -30
-
+
ERROR_SFTP_PROTOCOL = -31
-
+
ERROR_REQUEST_DENIED = -32
-
+
ERROR_METHOD_NOT_SUPPORTED = -33
-
+
ERROR_INVAL = -34
-
+
ERROR_INVALID_POLL_TYPE = -35
-
+
ERROR_PUBLICKEY_PROTOCOL = -36
-
+
ERROR_EAGAIN = -37
-
+
ERROR_BUFFER_TOO_SMALL = -38
-
+
ERROR_BAD_USE = -39
-
+
ERROR_COMPRESS = -40
-
+
ERROR_OUT_OF_BOUNDARY = -41
-
+
ERROR_AGENT_PROTOCOL = -42
-
+
ERROR_SOCKET_RECV = -43
-
+
ERROR_ENCRYPT = -44
-
+
ERROR_BAD_SOCKET = -45
-
+
INIT_NO_CRYPTO = 0x0001
-
+
def session_init()
session_init_ex(nil, nil, nil, nil)
end
-
+
def session_disconnect(session, description)
session_disconnect_ex(session, SSH_DISCONNECT_BY_APPLICATION, description, "")
end
-
+
def userauth_password(session, username, password)
userauth_password_ex(session, username, username.length, password, password.length, nil)
end
-
+
def userauth_publickey_fromfile(session, username, publickey, privatekey, passphrase)
userauth_publickey_fromfile_ex(session, username, username.length, publickey, privatekey, passphrase)
end
-
+
def userauth_hostbased_fromfile(session, username, publickey, privatekey, passphrase, hostname)
userauth_hostbased_fromfile_ex(session, username, username.length, publickey, privatekey, passphrase, hostname, hostname.length, username, username.length)
end
-
+
def userauth_keyboard_interactive(session, username, response_callback)
userauth_keyboard_interactive_ex(session, username, username.length, response_callback)
end
-
+
CHANNEL_WINDOW_DEFAULT = 65536
-
+
CHANNEL_PACKET_DEFAULT = 32768
-
+
CHANNEL_MINADJUST = 1024
-
+
CHANNEL_EXTENDED_DATA_NORMAL = 0
-
+
CHANNEL_EXTENDED_DATA_IGNORE = 1
-
+
CHANNEL_EXTENDED_DATA_MERGE = 2
-
+
SSH_EXTENDED_DATA_STDERR = 1
-
+
def channel_open_session(session)
channel_open_ex(session, "session", "session".length-1, CHANNEL_WINDOW_DEFAULT, CHANNEL_PACKET_DEFAULT, nil, 0)
end
-
+
def channel_direct_tcpip(session, host, port)
channel_direct_tcpip_ex(session, host, port, "127.0.0.1", 22)
end
-
+
def channel_forward_listen(session, port)
channel_forward_listen_ex(session, nil, port, nil, 16)
end
-
+
def channel_setenv(channel, varname, value)
channel_setenv_ex(channel, varname, varname.length, value, value.length)
end
-
+
def channel_request_pty(channel, term)
channel_request_pty_ex(channel, term, term.length, nil, 0, TERM_WIDTH, TERM_HEIGHT, TERM_WIDTH_PX, TERM_HEIGHT_PX)
end
-
+
def channel_request_pty_size(channel, width, height)
channel_request_pty_size_ex(channel, width, height, 0, 0)
end
-
+
def channel_x11_req(channel, screen_number)
channel_x11_req_ex(channel, 0, nil, nil, screen_number)
end
-
+
def channel_shell(channel)
channel_process_startup(channel, "shell", "shell".length-1, nil, 0)
end
-
+
def channel_exec(channel, command)
channel_process_startup(channel, "exec", "exec".length-1, command, command.length)
end
-
+
def channel_subsystem(channel, subsystem)
channel_process_startup(channel, "subsystem", "subsystem".length-1, subsystem, subsystem.length)
end
-
+
def channel_read(channel, buf, buflen)
channel_read_ex(channel, 0, buf, buflen)
end
-
+
def channel_read_stderr(channel, buf, buflen)
channel_read_ex(channel, SSH_EXTENDED_DATA_STDERR, buf, buflen)
end
-
+
def channel_window_read(channel)
channel_window_read_ex(channel, nil, nil)
end
-
+
def channel_write(channel, buf, buflen)
channel_write_ex(channel, 0, buf, buflen)
end
-
+
def channel_write_stderr(channel, buf, buflen)
channel_write_ex(channel, SSH_EXTENDED_DATA_STDERR, buf, buflen)
end
-
+
def channel_window_write(channel)
channel_window_write_ex(channel, nil)
end
-
+
CHANNEL_FLUSH_EXTENDED_DATA = -1
-
+
CHANNEL_FLUSH_ALL = -2
-
+
def channel_flush(channel)
channel_flush_ex(channel, 0)
end
-
+
def channel_flush_stderr(channel)
channel_flush_ex(channel, SSH_EXTENDED_DATA_STDERR)
end
-
+
def scp_send(session, path, mode, size)
scp_send_ex(session, path, mode, size, 0, 0)
end
-
+
HAVE_LIBSSH2_KNOWNHOST_API = 0x010101
-
+
HAVE_LIBSSH2_VERSION_API = 0x010100
-
+
KNOWNHOST_TYPE_MASK = 0xffff
-
+
KNOWNHOST_TYPE_PLAIN = 1
-
+
KNOWNHOST_TYPE_SHA1 = 2
-
+
KNOWNHOST_TYPE_CUSTOM = 3
-
+
KNOWNHOST_KEYENC_MASK = (3<<16)
-
+
KNOWNHOST_KEYENC_RAW = (1<<16)
-
+
KNOWNHOST_KEYENC_BASE64 = (2<<16)
-
+
KNOWNHOST_KEY_MASK = (3<<18)
-
+
KNOWNHOST_KEY_SHIFT = 18
-
+
KNOWNHOST_KEY_RSA1 = (1<<18)
-
+
KNOWNHOST_KEY_SSHRSA = (2<<18)
-
+
KNOWNHOST_KEY_SSHDSS = (3<<18)
-
+
KNOWNHOST_CHECK_MATCH = 0
-
+
KNOWNHOST_CHECK_MISMATCH = 1
-
+
KNOWNHOST_CHECK_NOTFOUND = 2
-
+
KNOWNHOST_CHECK_FAILURE = 3
-
+
KNOWNHOST_FILE_OPENSSH = 1
-
+
HAVE_LIBSSH2_AGENT_API = 0x010202
-
+
TRACE_TRANS = (1<<1)
-
+
TRACE_KEX = (1<<2)
-
+
TRACE_AUTH = (1<<3)
-
+
TRACE_CONN = (1<<4)
-
+
TRACE_SCP = (1<<5)
-
+
TRACE_SFTP = (1<<6)
-
+
TRACE_ERROR = (1<<7)
-
+
TRACE_PUBLICKEY = (1<<8)
-
+
TRACE_SOCKET = (1<<9)
-
+
# Malloc callbacks
- #
+
# = Fields:
# :text ::
- # (String)
+ # (String)
# :length ::
- # (Integer)
+ # (Integer)
# :echo ::
- # (Integer)
+ # (Integer)
class LIBSSH2USERAUTHKBDINTPROMPT < FFI::Struct
layout :text, :string,
:length, :uint,
:echo, :uchar
end
-
+
# (Not documented)
- #
+
# = Fields:
# :text ::
- # (String)
+ # (String)
# :length ::
- # (Integer)
+ # (Integer)
class LIBSSH2USERAUTHKBDINTRESPONSE < FFI::Struct
layout :text, :string,
:length, :uint
end
-
+
# flags
class LIBSSH2SESSION < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class LIBSSH2CHANNEL < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class LIBSSH2LISTENER < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class LIBSSH2KNOWNHOSTS < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class LIBSSH2AGENT < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
- #
+
# = Fields:
# :socket ::
# (Integer) File descriptors -- examined with system select() call
@@ -492,687 +494,624 @@ class LIBSSH2AGENT < FFI::Struct
# :listener ::
# (LIBSSH2LISTENER) Read polls only -- are inbound
# connections waiting to be accepted?
- class LIBSSH2POLLFDFd < FFI::Union
+ class LIBSSH2POLLFD697836898 < FFI::Union
layout :socket, :int,
:channel, LIBSSH2CHANNEL,
:listener, LIBSSH2LISTENER
end
-
+
# (Not documented)
- #
+
# = Fields:
# :type ::
# (Integer) LIBSSH2_POLLFD_* below
# :fd ::
- # (LIBSSH2POLLFDFd)
+ # (LIBSSH2POLLFD697836898)
# :events ::
# (Integer) Requested Events
# :revents ::
# (Integer) Returned Events
class LIBSSH2POLLFD < FFI::Struct
layout :type, :uchar,
- :fd, LIBSSH2POLLFDFd.by_value,
+ :fd, LIBSSH2POLLFD697836898.by_value,
:events, :ulong,
:revents, :ulong
end
-
+
# libssh2_init()
- #
+
# Initialize the libssh2 functions. This typically initialize the
# crypto library. It uses a global state, and is not thread safe --
# you must make sure this function is not called concurrently.
- #
+
# Flags can be:
# 0: Normal initialize
# LIBSSH2_INIT_NO_CRYPTO: Do not initialize the crypto library (ie.
# OPENSSL_add_cipher_algoritms() for OpenSSL
- #
+
# Returns 0 if succeeded, or a negative value for error.
- #
+
# @method init(flags)
- # @param [Integer] flags
- # @return [Integer]
+ # @param [Integer] flags
+ # @return [Integer]
# @scope class
attach_function :init, :libssh2_init, [:int], :int
-
# libssh2_exit()
- #
+
# Exit the libssh2 functions and free's all memory used internal.
- #
+
# @method exit()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :exit, :libssh2_exit, [], :void
-
# libssh2_free()
- #
+
# Deallocate memory allocated by earlier call to libssh2 functions.
- #
+
# @method free(session, ptr)
- # @param [LIBSSH2SESSION] session
- # @param [FFI::Pointer(*Void)] ptr
- # @return [nil]
+ # @param [LIBSSH2SESSION] session
+ # @param [FFI::Pointer(*Void)] ptr
+ # @return [nil]
# @scope class
attach_function :free, :libssh2_free, [LIBSSH2SESSION, :pointer], :void
-
# Session API
- #
+
# @method session_init_ex(my_alloc, my_free, my_realloc, abstract)
- # @param [FFI::Pointer(*)] my_alloc
- # @param [FFI::Pointer(*)] my_free
- # @param [FFI::Pointer(*)] my_realloc
- # @param [FFI::Pointer(*Void)] abstract
- # @return [LIBSSH2SESSION]
+ # @param [FFI::Pointer(*FunctionProto)] my_alloc
+ # @param [FFI::Pointer(*FunctionProto)] my_free
+ # @param [FFI::Pointer(*FunctionProto)] my_realloc
+ # @param [FFI::Pointer(*Void)] abstract
+ # @return [LIBSSH2SESSION]
# @scope class
attach_function :session_init_ex, :libssh2_session_init_ex, [:pointer, :pointer, :pointer, :pointer], LIBSSH2SESSION
-
# (Not documented)
- #
+
# @method session_abstract(session)
- # @param [LIBSSH2SESSION] session
- # @return [FFI::Pointer(**Void)]
+ # @param [LIBSSH2SESSION] session
+ # @return [FFI::Pointer(**Void)]
# @scope class
attach_function :session_abstract, :libssh2_session_abstract, [LIBSSH2SESSION], :pointer
-
# (Not documented)
- #
+
# @method session_callback_set(session, cbtype, callback)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] cbtype
- # @param [FFI::Pointer(*Void)] callback
- # @return [FFI::Pointer(*Void)]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] cbtype
+ # @param [FFI::Pointer(*Void)] callback
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :session_callback_set, :libssh2_session_callback_set, [LIBSSH2SESSION, :int, :pointer], :pointer
-
# (Not documented)
- #
+
# @method banner_set(session, banner)
- # @param [LIBSSH2SESSION] session
- # @param [String] banner
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] banner
+ # @return [Integer]
# @scope class
attach_function :banner_set, :libssh2_banner_set, [LIBSSH2SESSION, :string], :int
-
# (Not documented)
- #
+
# @method session_startup(session, sock)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] sock
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] sock
+ # @return [Integer]
# @scope class
attach_function :session_startup, :libssh2_session_startup, [LIBSSH2SESSION, :int], :int
-
# (Not documented)
- #
+
# @method session_handshake(session, sock)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] sock
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] sock
+ # @return [Integer]
# @scope class
attach_function :session_handshake, :libssh2_session_handshake, [LIBSSH2SESSION, :int], :int
-
# (Not documented)
- #
+
# @method session_disconnect_ex(session, reason, description, lang)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] reason
- # @param [String] description
- # @param [String] lang
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] reason
+ # @param [String] description
+ # @param [String] lang
+ # @return [Integer]
# @scope class
attach_function :session_disconnect_ex, :libssh2_session_disconnect_ex, [LIBSSH2SESSION, :int, :string, :string], :int
-
# (Not documented)
- #
+
# @method session_free(session)
- # @param [LIBSSH2SESSION] session
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @return [Integer]
# @scope class
attach_function :session_free, :libssh2_session_free, [LIBSSH2SESSION], :int
-
# (Not documented)
- #
+
# @method hostkey_hash(session, hash_type)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] hash_type
- # @return [String]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] hash_type
+ # @return [String]
# @scope class
attach_function :hostkey_hash, :libssh2_hostkey_hash, [LIBSSH2SESSION, :int], :string
-
# (Not documented)
- #
+
# @method session_hostkey(session, len, type)
- # @param [LIBSSH2SESSION] session
- # @param [FFI::Pointer(*SizeT)] len
- # @param [FFI::Pointer(*Int)] type
- # @return [String]
+ # @param [LIBSSH2SESSION] session
+ # @param [FFI::Pointer(*Int)] len
+ # @param [FFI::Pointer(*Int)] type
+ # @return [String]
# @scope class
attach_function :session_hostkey, :libssh2_session_hostkey, [LIBSSH2SESSION, :pointer, :pointer], :string
-
# (Not documented)
- #
+
# @method session_method_pref(session, method_type, prefs)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] method_type
- # @param [String] prefs
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] method_type
+ # @param [String] prefs
+ # @return [Integer]
# @scope class
attach_function :session_method_pref, :libssh2_session_method_pref, [LIBSSH2SESSION, :int, :string], :int
-
# (Not documented)
- #
+
# @method session_methods(session, method_type)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] method_type
- # @return [String]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] method_type
+ # @return [String]
# @scope class
attach_function :session_methods, :libssh2_session_methods, [LIBSSH2SESSION, :int], :string
-
# (Not documented)
- #
+
# @method session_last_error(session, errmsg, errmsg_len, want_buf)
- # @param [LIBSSH2SESSION] session
- # @param [FFI::Pointer(**CharS)] errmsg
- # @param [FFI::Pointer(*Int)] errmsg_len
- # @param [Integer] want_buf
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [FFI::Pointer(**CharS)] errmsg
+ # @param [FFI::Pointer(*Int)] errmsg_len
+ # @param [Integer] want_buf
+ # @return [Integer]
# @scope class
attach_function :session_last_error, :libssh2_session_last_error, [LIBSSH2SESSION, :pointer, :pointer, :int], :int
-
# (Not documented)
- #
+
# @method session_last_errno(session)
- # @param [LIBSSH2SESSION] session
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @return [Integer]
# @scope class
attach_function :session_last_errno, :libssh2_session_last_errno, [LIBSSH2SESSION], :int
-
# (Not documented)
- #
+
# @method session_block_directions(session)
- # @param [LIBSSH2SESSION] session
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @return [Integer]
# @scope class
attach_function :session_block_directions, :libssh2_session_block_directions, [LIBSSH2SESSION], :int
-
# (Not documented)
- #
+
# @method session_flag(session, flag, value)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] flag
- # @param [Integer] value
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] flag
+ # @param [Integer] value
+ # @return [Integer]
# @scope class
attach_function :session_flag, :libssh2_session_flag, [LIBSSH2SESSION, :int, :int], :int
-
# Userauth API
- #
+
# @method userauth_list(session, username, username_len)
- # @param [LIBSSH2SESSION] session
- # @param [String] username
- # @param [Integer] username_len
- # @return [String]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] username
+ # @param [Integer] username_len
+ # @return [String]
# @scope class
attach_function :userauth_list, :libssh2_userauth_list, [LIBSSH2SESSION, :string, :uint], :string
-
# (Not documented)
- #
+
# @method userauth_authenticated(session)
- # @param [LIBSSH2SESSION] session
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @return [Integer]
# @scope class
attach_function :userauth_authenticated, :libssh2_userauth_authenticated, [LIBSSH2SESSION], :int
-
# (Not documented)
- #
+
# @method userauth_password_ex(session, username, username_len, password, password_len, passwd_change_cb)
- # @param [LIBSSH2SESSION] session
- # @param [String] username
- # @param [Integer] username_len
- # @param [String] password
- # @param [Integer] password_len
- # @param [FFI::Pointer(*)] passwd_change_cb
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] username
+ # @param [Integer] username_len
+ # @param [String] password
+ # @param [Integer] password_len
+ # @param [FFI::Pointer(*FunctionProto)] passwd_change_cb
+ # @return [Integer]
# @scope class
attach_function :userauth_password_ex, :libssh2_userauth_password_ex, [LIBSSH2SESSION, :string, :uint, :string, :uint, :pointer], :int
-
# (Not documented)
- #
+
# @method userauth_publickey_fromfile_ex(session, username, username_len, publickey, privatekey, passphrase)
- # @param [LIBSSH2SESSION] session
- # @param [String] username
- # @param [Integer] username_len
- # @param [String] publickey
- # @param [String] privatekey
- # @param [String] passphrase
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] username
+ # @param [Integer] username_len
+ # @param [String] publickey
+ # @param [String] privatekey
+ # @param [String] passphrase
+ # @return [Integer]
# @scope class
attach_function :userauth_publickey_fromfile_ex, :libssh2_userauth_publickey_fromfile_ex, [LIBSSH2SESSION, :string, :uint, :string, :string, :string], :int
-
# (Not documented)
- #
+
# @method userauth_publickey(session, username, pubkeydata, pubkeydata_len, sign_callback, abstract)
- # @param [LIBSSH2SESSION] session
- # @param [String] username
- # @param [FFI::Pointer(*UChar)] pubkeydata
- # @param [Integer] pubkeydata_len
- # @param [FFI::Pointer(*)] sign_callback
- # @param [FFI::Pointer(**Void)] abstract
- # @return [Integer]
- # @scope class
- attach_function :userauth_publickey, :libssh2_userauth_publickey, [LIBSSH2SESSION, :string, :pointer, :ulong, :pointer, :pointer], :int
-
+ # @param [LIBSSH2SESSION] session
+ # @param [String] username
+ # @param [FFI::Pointer(*UChar)] pubkeydata
+ # @param [Integer] pubkeydata_len
+ # @param [FFI::Pointer(*FunctionProto)] sign_callback
+ # @param [FFI::Pointer(**Void)] abstract
+ # @return [Integer]
+ # @scope class
+ attach_function :userauth_publickey, :libssh2_userauth_publickey, [LIBSSH2SESSION, :string, :pointer, :int, :pointer, :pointer], :int
# (Not documented)
- #
+
# @method userauth_hostbased_fromfile_ex(session, username, username_len, publickey, privatekey, passphrase, hostname, hostname_len, local_username, local_username_len)
- # @param [LIBSSH2SESSION] session
- # @param [String] username
- # @param [Integer] username_len
- # @param [String] publickey
- # @param [String] privatekey
- # @param [String] passphrase
- # @param [String] hostname
- # @param [Integer] hostname_len
- # @param [String] local_username
- # @param [Integer] local_username_len
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] username
+ # @param [Integer] username_len
+ # @param [String] publickey
+ # @param [String] privatekey
+ # @param [String] passphrase
+ # @param [String] hostname
+ # @param [Integer] hostname_len
+ # @param [String] local_username
+ # @param [Integer] local_username_len
+ # @return [Integer]
# @scope class
attach_function :userauth_hostbased_fromfile_ex, :libssh2_userauth_hostbased_fromfile_ex, [LIBSSH2SESSION, :string, :uint, :string, :string, :string, :string, :uint, :string, :uint], :int
-
# response_callback is provided with filled by library prompts array,
# but client must allocate and fill individual responses. Responses
# array is already allocated. Responses data will be freed by libssh2
# after callback return, but before subsequent callback invokation.
- #
+
# @method userauth_keyboard_interactive_ex(session, username, username_len, response_callback)
- # @param [LIBSSH2SESSION] session
- # @param [String] username
- # @param [Integer] username_len
- # @param [FFI::Pointer(*)] response_callback
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] username
+ # @param [Integer] username_len
+ # @param [FFI::Pointer(*FunctionProto)] response_callback
+ # @return [Integer]
# @scope class
attach_function :userauth_keyboard_interactive_ex, :libssh2_userauth_keyboard_interactive_ex, [LIBSSH2SESSION, :string, :uint, :pointer], :int
-
# (Not documented)
- #
+
# @method poll(fds, nfds, timeout)
- # @param [LIBSSH2POLLFD] fds
- # @param [Integer] nfds
- # @param [Integer] timeout
- # @return [Integer]
+ # @param [LIBSSH2POLLFD] fds
+ # @param [Integer] nfds
+ # @param [Integer] timeout
+ # @return [Integer]
# @scope class
attach_function :poll, :libssh2_poll, [LIBSSH2POLLFD, :uint, :long], :int
-
# Returned by any function that would block during a read/write opperation
- #
+
# @method channel_open_ex(session, channel_type, channel_type_len, window_size, packet_size, message, message_len)
- # @param [LIBSSH2SESSION] session
- # @param [String] channel_type
- # @param [Integer] channel_type_len
- # @param [Integer] window_size
- # @param [Integer] packet_size
- # @param [String] message
- # @param [Integer] message_len
- # @return [LIBSSH2CHANNEL]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] channel_type
+ # @param [Integer] channel_type_len
+ # @param [Integer] window_size
+ # @param [Integer] packet_size
+ # @param [String] message
+ # @param [Integer] message_len
+ # @return [LIBSSH2CHANNEL]
# @scope class
attach_function :channel_open_ex, :libssh2_channel_open_ex, [LIBSSH2SESSION, :string, :uint, :uint, :uint, :string, :uint], LIBSSH2CHANNEL
-
# (Not documented)
- #
+
# @method channel_direct_tcpip_ex(session, host, port, shost, sport)
- # @param [LIBSSH2SESSION] session
- # @param [String] host
- # @param [Integer] port
- # @param [String] shost
- # @param [Integer] sport
- # @return [LIBSSH2CHANNEL]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] host
+ # @param [Integer] port
+ # @param [String] shost
+ # @param [Integer] sport
+ # @return [LIBSSH2CHANNEL]
# @scope class
attach_function :channel_direct_tcpip_ex, :libssh2_channel_direct_tcpip_ex, [LIBSSH2SESSION, :string, :int, :string, :int], LIBSSH2CHANNEL
-
# (Not documented)
- #
+
# @method channel_forward_listen_ex(session, host, port, bound_port, queue_maxsize)
- # @param [LIBSSH2SESSION] session
- # @param [String] host
- # @param [Integer] port
- # @param [FFI::Pointer(*Int)] bound_port
- # @param [Integer] queue_maxsize
- # @return [LIBSSH2LISTENER]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] host
+ # @param [Integer] port
+ # @param [FFI::Pointer(*Int)] bound_port
+ # @param [Integer] queue_maxsize
+ # @return [LIBSSH2LISTENER]
# @scope class
attach_function :channel_forward_listen_ex, :libssh2_channel_forward_listen_ex, [LIBSSH2SESSION, :string, :int, :pointer, :int], LIBSSH2LISTENER
-
# (Not documented)
- #
+
# @method channel_forward_cancel(listener)
- # @param [LIBSSH2LISTENER] listener
- # @return [Integer]
+ # @param [LIBSSH2LISTENER] listener
+ # @return [Integer]
# @scope class
attach_function :channel_forward_cancel, :libssh2_channel_forward_cancel, [LIBSSH2LISTENER], :int
-
# (Not documented)
- #
+
# @method channel_forward_accept(listener)
- # @param [LIBSSH2LISTENER] listener
- # @return [LIBSSH2CHANNEL]
+ # @param [LIBSSH2LISTENER] listener
+ # @return [LIBSSH2CHANNEL]
# @scope class
attach_function :channel_forward_accept, :libssh2_channel_forward_accept, [LIBSSH2LISTENER], LIBSSH2CHANNEL
-
# (Not documented)
- #
+
# @method channel_setenv_ex(channel, varname, varname_len, value, value_len)
- # @param [LIBSSH2CHANNEL] channel
- # @param [String] varname
- # @param [Integer] varname_len
- # @param [String] value
- # @param [Integer] value_len
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [String] varname
+ # @param [Integer] varname_len
+ # @param [String] value
+ # @param [Integer] value_len
+ # @return [Integer]
# @scope class
attach_function :channel_setenv_ex, :libssh2_channel_setenv_ex, [LIBSSH2CHANNEL, :string, :uint, :string, :uint], :int
-
# (Not documented)
- #
+
# @method channel_request_pty_ex(channel, term, term_len, modes, modes_len, width, height, width_px, height_px)
- # @param [LIBSSH2CHANNEL] channel
- # @param [String] term
- # @param [Integer] term_len
- # @param [String] modes
- # @param [Integer] modes_len
- # @param [Integer] width
- # @param [Integer] height
- # @param [Integer] width_px
- # @param [Integer] height_px
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [String] term
+ # @param [Integer] term_len
+ # @param [String] modes
+ # @param [Integer] modes_len
+ # @param [Integer] width
+ # @param [Integer] height
+ # @param [Integer] width_px
+ # @param [Integer] height_px
+ # @return [Integer]
# @scope class
attach_function :channel_request_pty_ex, :libssh2_channel_request_pty_ex, [LIBSSH2CHANNEL, :string, :uint, :string, :uint, :int, :int, :int, :int], :int
-
# (Not documented)
- #
+
# @method channel_request_pty_size_ex(channel, width, height, width_px, height_px)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] width
- # @param [Integer] height
- # @param [Integer] width_px
- # @param [Integer] height_px
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] width
+ # @param [Integer] height
+ # @param [Integer] width_px
+ # @param [Integer] height_px
+ # @return [Integer]
# @scope class
attach_function :channel_request_pty_size_ex, :libssh2_channel_request_pty_size_ex, [LIBSSH2CHANNEL, :int, :int, :int, :int], :int
-
# (Not documented)
- #
+
# @method channel_x11_req_ex(channel, single_connection, auth_proto, auth_cookie, screen_number)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] single_connection
- # @param [String] auth_proto
- # @param [String] auth_cookie
- # @param [Integer] screen_number
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] single_connection
+ # @param [String] auth_proto
+ # @param [String] auth_cookie
+ # @param [Integer] screen_number
+ # @return [Integer]
# @scope class
attach_function :channel_x11_req_ex, :libssh2_channel_x11_req_ex, [LIBSSH2CHANNEL, :int, :string, :string, :int], :int
-
# (Not documented)
- #
+
# @method channel_process_startup(channel, request, request_len, message, message_len)
- # @param [LIBSSH2CHANNEL] channel
- # @param [String] request
- # @param [Integer] request_len
- # @param [String] message
- # @param [Integer] message_len
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [String] request
+ # @param [Integer] request_len
+ # @param [String] message
+ # @param [Integer] message_len
+ # @return [Integer]
# @scope class
attach_function :channel_process_startup, :libssh2_channel_process_startup, [LIBSSH2CHANNEL, :string, :uint, :string, :uint], :int
-
# (Not documented)
- #
+
# @method channel_read_ex(channel, stream_id, buf, buflen)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] stream_id
- # @param [String] buf
- # @param [Integer] buflen
- # @return [Integer]
- # @scope class
- attach_function :channel_read_ex, :libssh2_channel_read_ex, [LIBSSH2CHANNEL, :int, :string, :ulong], :long
-
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] stream_id
+ # @param [String] buf
+ # @param [Integer] buflen
+ # @return [Integer]
+ # @scope class
+ attach_function :channel_read_ex, :libssh2_channel_read_ex, [LIBSSH2CHANNEL, :int, :string, :int], :int
# (Not documented)
- #
+
# @method poll_channel_read(channel, extended)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] extended
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] extended
+ # @return [Integer]
# @scope class
attach_function :poll_channel_read, :libssh2_poll_channel_read, [LIBSSH2CHANNEL, :int], :int
-
# (Not documented)
- #
+
# @method channel_window_read_ex(channel, read_avail, window_size_initial)
- # @param [LIBSSH2CHANNEL] channel
- # @param [FFI::Pointer(*ULong)] read_avail
- # @param [FFI::Pointer(*ULong)] window_size_initial
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [FFI::Pointer(*ULong)] read_avail
+ # @param [FFI::Pointer(*ULong)] window_size_initial
+ # @return [Integer]
# @scope class
attach_function :channel_window_read_ex, :libssh2_channel_window_read_ex, [LIBSSH2CHANNEL, :pointer, :pointer], :ulong
-
# libssh2_channel_receive_window_adjust is DEPRECATED, do not use!
- #
+
# @method channel_receive_window_adjust(channel, adjustment, force)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] adjustment
- # @param [Integer] force
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] adjustment
+ # @param [Integer] force
+ # @return [Integer]
# @scope class
attach_function :channel_receive_window_adjust, :libssh2_channel_receive_window_adjust, [LIBSSH2CHANNEL, :ulong, :uchar], :ulong
-
# (Not documented)
- #
+
# @method channel_receive_window_adjust2(channel, adjustment, force, storewindow)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] adjustment
- # @param [Integer] force
- # @param [FFI::Pointer(*UInt)] storewindow
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] adjustment
+ # @param [Integer] force
+ # @param [FFI::Pointer(*UInt)] storewindow
+ # @return [Integer]
# @scope class
attach_function :channel_receive_window_adjust2, :libssh2_channel_receive_window_adjust2, [LIBSSH2CHANNEL, :ulong, :uchar, :pointer], :int
-
# (Not documented)
- #
+
# @method channel_write_ex(channel, stream_id, buf, buflen)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] stream_id
- # @param [String] buf
- # @param [Integer] buflen
- # @return [Integer]
- # @scope class
- attach_function :channel_write_ex, :libssh2_channel_write_ex, [LIBSSH2CHANNEL, :int, :string, :ulong], :long
-
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] stream_id
+ # @param [String] buf
+ # @param [Integer] buflen
+ # @return [Integer]
+ # @scope class
+ attach_function :channel_write_ex, :libssh2_channel_write_ex, [LIBSSH2CHANNEL, :int, :string, :int], :int
# (Not documented)
- #
+
# @method channel_window_write_ex(channel, window_size_initial)
- # @param [LIBSSH2CHANNEL] channel
- # @param [FFI::Pointer(*ULong)] window_size_initial
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [FFI::Pointer(*ULong)] window_size_initial
+ # @return [Integer]
# @scope class
attach_function :channel_window_write_ex, :libssh2_channel_window_write_ex, [LIBSSH2CHANNEL, :pointer], :ulong
-
# (Not documented)
- #
+
# @method session_set_blocking(session, blocking)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] blocking
- # @return [nil]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] blocking
+ # @return [nil]
# @scope class
attach_function :session_set_blocking, :libssh2_session_set_blocking, [LIBSSH2SESSION, :int], :void
-
# (Not documented)
- #
+
# @method session_get_blocking(session)
- # @param [LIBSSH2SESSION] session
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @return [Integer]
# @scope class
attach_function :session_get_blocking, :libssh2_session_get_blocking, [LIBSSH2SESSION], :int
-
# (Not documented)
- #
+
# @method channel_set_blocking(channel, blocking)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] blocking
- # @return [nil]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] blocking
+ # @return [nil]
# @scope class
attach_function :channel_set_blocking, :libssh2_channel_set_blocking, [LIBSSH2CHANNEL, :int], :void
-
# libssh2_channel_handle_extended_data is DEPRECATED, do not use!
- #
+
# @method channel_handle_extended_data(channel, ignore_mode)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] ignore_mode
- # @return [nil]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] ignore_mode
+ # @return [nil]
# @scope class
attach_function :channel_handle_extended_data, :libssh2_channel_handle_extended_data, [LIBSSH2CHANNEL, :int], :void
-
# (Not documented)
- #
+
# @method channel_handle_extended_data2(channel, ignore_mode)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] ignore_mode
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] ignore_mode
+ # @return [Integer]
# @scope class
attach_function :channel_handle_extended_data2, :libssh2_channel_handle_extended_data2, [LIBSSH2CHANNEL, :int], :int
-
# DEPRECATED
- #
+
# @method channel_flush_ex(channel, streamid)
- # @param [LIBSSH2CHANNEL] channel
- # @param [Integer] streamid
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [Integer] streamid
+ # @return [Integer]
# @scope class
attach_function :channel_flush_ex, :libssh2_channel_flush_ex, [LIBSSH2CHANNEL, :int], :int
-
# (Not documented)
- #
+
# @method channel_get_exit_status(channel)
- # @param [LIBSSH2CHANNEL] channel
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @return [Integer]
# @scope class
attach_function :channel_get_exit_status, :libssh2_channel_get_exit_status, [LIBSSH2CHANNEL], :int
-
# (Not documented)
- #
+
# @method channel_get_exit_signal(channel, exitsignal, exitsignal_len, errmsg, errmsg_len, langtag, langtag_len)
- # @param [LIBSSH2CHANNEL] channel
- # @param [FFI::Pointer(**CharS)] exitsignal
- # @param [FFI::Pointer(*SizeT)] exitsignal_len
- # @param [FFI::Pointer(**CharS)] errmsg
- # @param [FFI::Pointer(*SizeT)] errmsg_len
- # @param [FFI::Pointer(**CharS)] langtag
- # @param [FFI::Pointer(*SizeT)] langtag_len
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @param [FFI::Pointer(**CharS)] exitsignal
+ # @param [FFI::Pointer(*Int)] exitsignal_len
+ # @param [FFI::Pointer(**CharS)] errmsg
+ # @param [FFI::Pointer(*Int)] errmsg_len
+ # @param [FFI::Pointer(**CharS)] langtag
+ # @param [FFI::Pointer(*Int)] langtag_len
+ # @return [Integer]
# @scope class
attach_function :channel_get_exit_signal, :libssh2_channel_get_exit_signal, [LIBSSH2CHANNEL, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method channel_send_eof(channel)
- # @param [LIBSSH2CHANNEL] channel
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @return [Integer]
# @scope class
attach_function :channel_send_eof, :libssh2_channel_send_eof, [LIBSSH2CHANNEL], :int
-
# (Not documented)
- #
+
# @method channel_eof(channel)
- # @param [LIBSSH2CHANNEL] channel
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @return [Integer]
# @scope class
attach_function :channel_eof, :libssh2_channel_eof, [LIBSSH2CHANNEL], :int
-
# (Not documented)
- #
+
# @method channel_wait_eof(channel)
- # @param [LIBSSH2CHANNEL] channel
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @return [Integer]
# @scope class
attach_function :channel_wait_eof, :libssh2_channel_wait_eof, [LIBSSH2CHANNEL], :int
-
# (Not documented)
- #
+
# @method channel_close(channel)
- # @param [LIBSSH2CHANNEL] channel
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @return [Integer]
# @scope class
attach_function :channel_close, :libssh2_channel_close, [LIBSSH2CHANNEL], :int
-
# (Not documented)
- #
+
# @method channel_wait_closed(channel)
- # @param [LIBSSH2CHANNEL] channel
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @return [Integer]
# @scope class
attach_function :channel_wait_closed, :libssh2_channel_wait_closed, [LIBSSH2CHANNEL], :int
-
# (Not documented)
- #
+
# @method channel_free(channel)
- # @param [LIBSSH2CHANNEL] channel
- # @return [Integer]
+ # @param [LIBSSH2CHANNEL] channel
+ # @return [Integer]
# @scope class
attach_function :channel_free, :libssh2_channel_free, [LIBSSH2CHANNEL], :int
-
# (Not documented)
- #
+
# @method scp_recv(session, path, sb)
- # @param [LIBSSH2SESSION] session
- # @param [String] path
- # @param [FFI::Pointer(*Stat)] sb
- # @return [LIBSSH2CHANNEL]
+ # @param [LIBSSH2SESSION] session
+ # @param [String] path
+ # @param [FFI::Pointer(*Stat)] sb
+ # @return [LIBSSH2CHANNEL]
# @scope class
attach_function :scp_recv, :libssh2_scp_recv, [LIBSSH2SESSION, :string, :pointer], LIBSSH2CHANNEL
-
# (Not documented)
- #
+
# @method scp_send_ex(session, path, mode, size, mtime, atime)
- # @param [LIBSSH2SESSION] session
- # @param [String] path
- # @param [Integer] mode
- # @param [Integer] size
- # @param [Integer] mtime
- # @param [Integer] atime
- # @return [LIBSSH2CHANNEL]
- # @scope class
- attach_function :scp_send_ex, :libssh2_scp_send_ex, [LIBSSH2SESSION, :string, :int, :ulong, :long, :long], LIBSSH2CHANNEL
-
+ # @param [LIBSSH2SESSION] session
+ # @param [String] path
+ # @param [Integer] mode
+ # @param [Integer] size
+ # @param [Integer] mtime
+ # @param [Integer] atime
+ # @return [LIBSSH2CHANNEL]
+ # @scope class
+ attach_function :scp_send_ex, :libssh2_scp_send_ex, [LIBSSH2SESSION, :string, :int, :int, :long, :long], LIBSSH2CHANNEL
# (Not documented)
- #
+
# @method scp_send64(session, path, mode, size, mtime, atime)
- # @param [LIBSSH2SESSION] session
- # @param [String] path
- # @param [Integer] mode
- # @param [Integer] size
- # @param [Integer] mtime
- # @param [Integer] atime
- # @return [LIBSSH2CHANNEL]
- # @scope class
- attach_function :scp_send64, :libssh2_scp_send64, [LIBSSH2SESSION, :string, :int, :long_long, :long, :long], LIBSSH2CHANNEL
-
+ # @param [LIBSSH2SESSION] session
+ # @param [String] path
+ # @param [Integer] mode
+ # @param [Integer] size
+ # @param [Integer] mtime
+ # @param [Integer] atime
+ # @return [LIBSSH2CHANNEL]
+ # @scope class
+ attach_function :scp_send64, :libssh2_scp_send64, [LIBSSH2SESSION, :string, :int, :long_long, :int, :int], LIBSSH2CHANNEL
# (Not documented)
- #
+
# @method base64_decode(session, dest, dest_len, src, src_len)
- # @param [LIBSSH2SESSION] session
- # @param [FFI::Pointer(**CharS)] dest
- # @param [FFI::Pointer(*UInt)] dest_len
- # @param [String] src
- # @param [Integer] src_len
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [FFI::Pointer(**CharS)] dest
+ # @param [FFI::Pointer(*UInt)] dest_len
+ # @param [String] src
+ # @param [Integer] src_len
+ # @return [Integer]
# @scope class
attach_function :base64_decode, :libssh2_base64_decode, [LIBSSH2SESSION, :pointer, :pointer, :string, :uint], :int
-
# (Not documented)
- #
+
# @method version(req_version_num)
- # @param [Integer] req_version_num
- # @return [String]
+ # @param [Integer] req_version_num
+ # @return [String]
# @scope class
attach_function :version, :libssh2_version, [:int], :string
-
# libssh2_version since 1.1
- #
+
# = Fields:
# :magic ::
# (Integer) magic stored by the library
@@ -1183,7 +1122,7 @@ class LIBSSH2POLLFD < FFI::Struct
# :key ::
# (String) key in base64/printable format
# :typemask ::
- # (Integer)
+ # (Integer)
class Knownhost < FFI::Struct
layout :magic, :uint,
:node, :pointer,
@@ -1191,223 +1130,211 @@ class Knownhost < FFI::Struct
:key, :string,
:typemask, :int
end
-
+
# libssh2_knownhost_init
- #
+
# Init a collection of known hosts. Returns the pointer to a collection.
- #
+
# @method knownhost_init(session)
- # @param [LIBSSH2SESSION] session
- # @return [LIBSSH2KNOWNHOSTS]
+ # @param [LIBSSH2SESSION] session
+ # @return [LIBSSH2KNOWNHOSTS]
# @scope class
attach_function :knownhost_init, :libssh2_knownhost_init, [LIBSSH2SESSION], LIBSSH2KNOWNHOSTS
-
# type of key (2 bits)
- #
+
# @method knownhost_add(hosts, host, salt, key, keylen, typemask, store)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [String] host
- # @param [String] salt
- # @param [String] key
- # @param [Integer] keylen
- # @param [Integer] typemask
- # @param [FFI::Pointer(**Knownhost)] store
- # @return [Integer]
- # @scope class
- attach_function :knownhost_add, :libssh2_knownhost_add, [LIBSSH2KNOWNHOSTS, :string, :string, :string, :ulong, :int, :pointer], :int
-
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [String] host
+ # @param [String] salt
+ # @param [String] key
+ # @param [Integer] keylen
+ # @param [Integer] typemask
+ # @param [FFI::Pointer(**Knownhost)] store
+ # @return [Integer]
+ # @scope class
+ attach_function :knownhost_add, :libssh2_knownhost_add, [LIBSSH2KNOWNHOSTS, :string, :string, :string, :int, :int, :pointer], :int
# libssh2_knownhost_addc
- #
+
# Add a host and its associated key to the collection of known hosts.
- #
+
# Takes a comment argument that may be NULL. A NULL comment indicates
# there is no comment and the entry will end directly after the key
# when written out to a file. An empty string "" comment will indicate an
# empty comment which will cause a single space to be written after the key.
- #
+
# The 'type' argument specifies on what format the given host and keys are:
- #
+
# plain - ascii "hostname.domain.tld"
# sha1 - SHA1( ) base64-encoded!
# custom - another hash
- #
+
# If 'sha1' is selected as type, the salt must be provided to the salt
# argument. This too base64 encoded.
- #
+
# The SHA-1 hash is what OpenSSH can be told to use in known_hosts files. If
# a custom type is used, salt is ignored and you must provide the host
# pre-hashed when checking for it in the libssh2_knownhost_check() function.
- #
+
# The keylen parameter may be omitted (zero) if the key is provided as a
# NULL-terminated base64-encoded string.
- #
+
# @method knownhost_addc(hosts, host, salt, key, keylen, comment, commentlen, typemask, store)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [String] host
- # @param [String] salt
- # @param [String] key
- # @param [Integer] keylen
- # @param [String] comment
- # @param [Integer] commentlen
- # @param [Integer] typemask
- # @param [FFI::Pointer(**Knownhost)] store
- # @return [Integer]
- # @scope class
- attach_function :knownhost_addc, :libssh2_knownhost_addc, [LIBSSH2KNOWNHOSTS, :string, :string, :string, :ulong, :string, :ulong, :int, :pointer], :int
-
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [String] host
+ # @param [String] salt
+ # @param [String] key
+ # @param [Integer] keylen
+ # @param [String] comment
+ # @param [Integer] commentlen
+ # @param [Integer] typemask
+ # @param [FFI::Pointer(**Knownhost)] store
+ # @return [Integer]
+ # @scope class
+ attach_function :knownhost_addc, :libssh2_knownhost_addc, [LIBSSH2KNOWNHOSTS, :string, :string, :string, :int, :string, :int, :int, :pointer], :int
# libssh2_knownhost_check
- #
+
# Check a host and its associated key against the collection of known hosts.
- #
+
# The type is the type/format of the given host name.
- #
+
# plain - ascii "hostname.domain.tld"
# custom - prehashed base64 encoded. Note that this cannot use any salts.
- #
- #
+
+
# 'knownhost' may be set to NULL if you don't care about that info.
- #
+
# Returns:
- #
+
# LIBSSH2_KNOWNHOST_CHECK_* values, see below
- #
+
# @method knownhost_check(hosts, host, key, keylen, typemask, knownhost)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [String] host
- # @param [String] key
- # @param [Integer] keylen
- # @param [Integer] typemask
- # @param [FFI::Pointer(**Knownhost)] knownhost
- # @return [Integer]
- # @scope class
- attach_function :knownhost_check, :libssh2_knownhost_check, [LIBSSH2KNOWNHOSTS, :string, :string, :ulong, :int, :pointer], :int
-
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [String] host
+ # @param [String] key
+ # @param [Integer] keylen
+ # @param [Integer] typemask
+ # @param [FFI::Pointer(**Knownhost)] knownhost
+ # @return [Integer]
+ # @scope class
+ attach_function :knownhost_check, :libssh2_knownhost_check, [LIBSSH2KNOWNHOSTS, :string, :string, :int, :int, :pointer], :int
# this function is identital to the above one, but also takes a port
# argument that allows libssh2 to do a better check
- #
+
# @method knownhost_checkp(hosts, host, port, key, keylen, typemask, knownhost)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [String] host
- # @param [Integer] port
- # @param [String] key
- # @param [Integer] keylen
- # @param [Integer] typemask
- # @param [FFI::Pointer(**Knownhost)] knownhost
- # @return [Integer]
- # @scope class
- attach_function :knownhost_checkp, :libssh2_knownhost_checkp, [LIBSSH2KNOWNHOSTS, :string, :int, :string, :ulong, :int, :pointer], :int
-
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [String] host
+ # @param [Integer] port
+ # @param [String] key
+ # @param [Integer] keylen
+ # @param [Integer] typemask
+ # @param [FFI::Pointer(**Knownhost)] knownhost
+ # @return [Integer]
+ # @scope class
+ attach_function :knownhost_checkp, :libssh2_knownhost_checkp, [LIBSSH2KNOWNHOSTS, :string, :int, :string, :int, :int, :pointer], :int
# libssh2_knownhost_del
- #
+
# Remove a host from the collection of known hosts. The 'entry' struct is
# retrieved by a call to libssh2_knownhost_check().
- #
+
# @method knownhost_del(hosts, entry)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [Knownhost] entry
- # @return [Integer]
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [Knownhost] entry
+ # @return [Integer]
# @scope class
attach_function :knownhost_del, :libssh2_knownhost_del, [LIBSSH2KNOWNHOSTS, Knownhost], :int
-
# libssh2_knownhost_free
- #
+
# Free an entire collection of known hosts.
- #
+
# @method knownhost_free(hosts)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @return [nil]
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @return [nil]
# @scope class
attach_function :knownhost_free, :libssh2_knownhost_free, [LIBSSH2KNOWNHOSTS], :void
-
# libssh2_knownhost_readline()
- #
+
# Pass in a line of a file of 'type'. It makes libssh2 read this line.
- #
+
# LIBSSH2_KNOWNHOST_FILE_OPENSSH is the only supported type.
- #
+
# @method knownhost_readline(hosts, line, len, type)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [String] line
- # @param [Integer] len
- # @param [Integer] type
- # @return [Integer]
- # @scope class
- attach_function :knownhost_readline, :libssh2_knownhost_readline, [LIBSSH2KNOWNHOSTS, :string, :ulong, :int], :int
-
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [String] line
+ # @param [Integer] len
+ # @param [Integer] type
+ # @return [Integer]
+ # @scope class
+ attach_function :knownhost_readline, :libssh2_knownhost_readline, [LIBSSH2KNOWNHOSTS, :string, :int, :int], :int
# libssh2_knownhost_readfile
- #
+
# Add hosts+key pairs from a given file.
- #
+
# Returns a negative value for error or number of successfully added hosts.
- #
+
# This implementation currently only knows one 'type' (openssh), all others
# are reserved for future use.
- #
+
# @method knownhost_readfile(hosts, filename, type)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [String] filename
- # @param [Integer] type
- # @return [Integer]
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [String] filename
+ # @param [Integer] type
+ # @return [Integer]
# @scope class
attach_function :knownhost_readfile, :libssh2_knownhost_readfile, [LIBSSH2KNOWNHOSTS, :string, :int], :int
-
# libssh2_knownhost_writeline()
- #
+
# Ask libssh2 to convert a known host to an output line for storage.
- #
+
# Note that this function returns LIBSSH2_ERROR_BUFFER_TOO_SMALL if the given
# output buffer is too small to hold the desired output.
- #
+
# This implementation currently only knows one 'type' (openssh), all others
# are reserved for future use.
- #
+
# @method knownhost_writeline(hosts, known, buffer, buflen, outlen, type)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [Knownhost] known
- # @param [String] buffer
- # @param [Integer] buflen
- # @param [FFI::Pointer(*SizeT)] outlen
- # @param [Integer] type
- # @return [Integer]
- # @scope class
- attach_function :knownhost_writeline, :libssh2_knownhost_writeline, [LIBSSH2KNOWNHOSTS, Knownhost, :string, :ulong, :pointer, :int], :int
-
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [Knownhost] known
+ # @param [String] buffer
+ # @param [Integer] buflen
+ # @param [FFI::Pointer(*Int)] outlen
+ # @param [Integer] type
+ # @return [Integer]
+ # @scope class
+ attach_function :knownhost_writeline, :libssh2_knownhost_writeline, [LIBSSH2KNOWNHOSTS, Knownhost, :string, :int, :pointer, :int], :int
# libssh2_knownhost_writefile
- #
+
# Write hosts+key pairs to a given file.
- #
+
# This implementation currently only knows one 'type' (openssh), all others
# are reserved for future use.
- #
+
# @method knownhost_writefile(hosts, filename, type)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [String] filename
- # @param [Integer] type
- # @return [Integer]
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [String] filename
+ # @param [Integer] type
+ # @return [Integer]
# @scope class
attach_function :knownhost_writefile, :libssh2_knownhost_writefile, [LIBSSH2KNOWNHOSTS, :string, :int], :int
-
# libssh2_knownhost_get()
- #
+
# Traverse the internal list of known hosts. Pass NULL to 'prev' to get
# the first one. Or pass a poiner to the previously returned one to get the
# next.
- #
+
# Returns:
# 0 if a fine host was stored in 'store'
# 1 if end of hosts
# (negative) on errors
- #
+
# @method knownhost_get(hosts, store, prev)
- # @param [LIBSSH2KNOWNHOSTS] hosts
- # @param [FFI::Pointer(**Knownhost)] store
- # @param [Knownhost] prev
- # @return [Integer]
+ # @param [LIBSSH2KNOWNHOSTS] hosts
+ # @param [FFI::Pointer(**Knownhost)] store
+ # @param [Knownhost] prev
+ # @return [Integer]
# @scope class
attach_function :knownhost_get, :libssh2_knownhost_get, [LIBSSH2KNOWNHOSTS, :pointer, Knownhost], :int
-
# since 1.2.2
- #
+
# = Fields:
# :magic ::
# (Integer) magic stored by the library
@@ -1423,165 +1350,155 @@ class AgentPublickey < FFI::Struct
layout :magic, :uint,
:node, :pointer,
:blob, :pointer,
- :blob_len, :ulong,
+ :blob_len, :int,
:comment, :string
end
-
+
# libssh2_agent_init
- #
+
# Init an ssh-agent handle. Returns the pointer to the handle.
- #
+
# @method agent_init(session)
- # @param [LIBSSH2SESSION] session
- # @return [LIBSSH2AGENT]
+ # @param [LIBSSH2SESSION] session
+ # @return [LIBSSH2AGENT]
# @scope class
attach_function :agent_init, :libssh2_agent_init, [LIBSSH2SESSION], LIBSSH2AGENT
-
# libssh2_agent_connect()
- #
+
# Connect to an ssh-agent.
- #
+
# Returns 0 if succeeded, or a negative value for error.
- #
+
# @method agent_connect(agent)
- # @param [LIBSSH2AGENT] agent
- # @return [Integer]
+ # @param [LIBSSH2AGENT] agent
+ # @return [Integer]
# @scope class
attach_function :agent_connect, :libssh2_agent_connect, [LIBSSH2AGENT], :int
-
# libssh2_agent_list_identities()
- #
+
# Request an ssh-agent to list identities.
- #
+
# Returns 0 if succeeded, or a negative value for error.
- #
+
# @method agent_list_identities(agent)
- # @param [LIBSSH2AGENT] agent
- # @return [Integer]
+ # @param [LIBSSH2AGENT] agent
+ # @return [Integer]
# @scope class
attach_function :agent_list_identities, :libssh2_agent_list_identities, [LIBSSH2AGENT], :int
-
# libssh2_agent_get_identity()
- #
+
# Traverse the internal list of public keys. Pass NULL to 'prev' to get
# the first one. Or pass a poiner to the previously returned one to get the
# next.
- #
+
# Returns:
# 0 if a fine public key was stored in 'store'
# 1 if end of public keys
# (negative) on errors
- #
+
# @method agent_get_identity(agent, store, prev)
- # @param [LIBSSH2AGENT] agent
- # @param [FFI::Pointer(**AgentPublickey)] store
- # @param [AgentPublickey] prev
- # @return [Integer]
+ # @param [LIBSSH2AGENT] agent
+ # @param [FFI::Pointer(**AgentPublickey)] store
+ # @param [AgentPublickey] prev
+ # @return [Integer]
# @scope class
attach_function :agent_get_identity, :libssh2_agent_get_identity, [LIBSSH2AGENT, :pointer, AgentPublickey], :int
-
# libssh2_agent_userauth()
- #
+
# Do publickey user authentication with the help of ssh-agent.
- #
+
# Returns 0 if succeeded, or a negative value for error.
- #
+
# @method agent_userauth(agent, username, identity)
- # @param [LIBSSH2AGENT] agent
- # @param [String] username
- # @param [AgentPublickey] identity
- # @return [Integer]
+ # @param [LIBSSH2AGENT] agent
+ # @param [String] username
+ # @param [AgentPublickey] identity
+ # @return [Integer]
# @scope class
attach_function :agent_userauth, :libssh2_agent_userauth, [LIBSSH2AGENT, :string, AgentPublickey], :int
-
# libssh2_agent_disconnect()
- #
+
# Close a connection to an ssh-agent.
- #
+
# Returns 0 if succeeded, or a negative value for error.
- #
+
# @method agent_disconnect(agent)
- # @param [LIBSSH2AGENT] agent
- # @return [Integer]
+ # @param [LIBSSH2AGENT] agent
+ # @return [Integer]
# @scope class
attach_function :agent_disconnect, :libssh2_agent_disconnect, [LIBSSH2AGENT], :int
-
# libssh2_agent_free()
- #
+
# Free an ssh-agent handle. This function also frees the internal
# collection of public keys.
- #
+
# @method agent_free(agent)
- # @param [LIBSSH2AGENT] agent
- # @return [nil]
+ # @param [LIBSSH2AGENT] agent
+ # @return [nil]
# @scope class
attach_function :agent_free, :libssh2_agent_free, [LIBSSH2AGENT], :void
-
# libssh2_keepalive_config()
- #
+
# Set how often keepalive messages should be sent. WANT_REPLY
# indicates whether the keepalive messages should request a response
# from the server. INTERVAL is number of seconds that can pass
# without any I/O, use 0 (the default) to disable keepalives. To
# avoid some busy-loop corner-cases, if you specify an interval of 1
# it will be treated as 2.
- #
+
# Note that non-blocking applications are responsible for sending the
# keepalive messages using libssh2_keepalive_send().
- #
+
# @method keepalive_config(session, want_reply, interval)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] want_reply
- # @param [Integer] interval
- # @return [nil]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] want_reply
+ # @param [Integer] interval
+ # @return [nil]
# @scope class
attach_function :keepalive_config, :libssh2_keepalive_config, [LIBSSH2SESSION, :int, :uint], :void
-
# libssh2_keepalive_send()
- #
+
# Send a keepalive message if needed. SECONDS_TO_NEXT indicates how
# many seconds you can sleep after this call before you need to call
# it again. Returns 0 on success, or LIBSSH2_ERROR_SOCKET_SEND on
# I/O errors.
- #
+
# @method keepalive_send(session, seconds_to_next)
- # @param [LIBSSH2SESSION] session
- # @param [FFI::Pointer(*Int)] seconds_to_next
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [FFI::Pointer(*Int)] seconds_to_next
+ # @return [Integer]
# @scope class
attach_function :keepalive_send, :libssh2_keepalive_send, [LIBSSH2SESSION, :pointer], :int
-
# NOTE NOTE NOTE
# libssh2_trace() has no function in builds that aren't built with debug
# enabled
- #
+
# @method trace(session, bitmask)
- # @param [LIBSSH2SESSION] session
- # @param [Integer] bitmask
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [Integer] bitmask
+ # @return [Integer]
# @scope class
attach_function :trace, :libssh2_trace, [LIBSSH2SESSION, :int], :int
-
# (Not documented)
- #
+
# This entry is only for documentation and no real method.
- #
- # @method _callback_trace_handler_func_(void, string, u_long)
- # @param [FFI::Pointer(*Void)] void
- # @param [String] string
- # @param [Integer] u_long
- # @return [LIBSSH2SESSION]
- # @scope class
- callback :trace_handler_func, [:pointer, :string, :ulong], LIBSSH2SESSION
-
+
+ # @method _callback_trace_handler_func_(libssh2_session, void, string, size_t)
+ # @param [LIBSSH2SESSION] libssh2_session
+ # @param [FFI::Pointer(*Void)] void
+ # @param [String] string
+ # @param [Integer] size_t
+ # @return [LIBSSH2SESSION]
+ # @scope class
+ callback :trace_handler_func, [LIBSSH2SESSION, :pointer, :string, :int], LIBSSH2SESSION
+
# (Not documented)
- #
+
# @method trace_sethandler(session, context, callback)
- # @param [LIBSSH2SESSION] session
- # @param [FFI::Pointer(*Void)] context
- # @param [Proc(_callback_trace_handler_func_)] callback
- # @return [Integer]
+ # @param [LIBSSH2SESSION] session
+ # @param [FFI::Pointer(*Void)] context
+ # @param [FFI::Pointer(TraceHandlerFunc)] callback
+ # @return [Integer]
# @scope class
- attach_function :trace_sethandler, :libssh2_trace_sethandler, [LIBSSH2SESSION, :pointer, :trace_handler_func], :int
-
+ attach_function :trace_sethandler, :libssh2_trace_sethandler, [LIBSSH2SESSION, :pointer, :pointer], :int
end
diff --git a/test/output/llvm-c/Analysis.rb b/test/output/llvm-c/Analysis.rb
index 6002c20..5624dd1 100644
--- a/test/output/llvm-c/Analysis.rb
+++ b/test/output/llvm-c/Analysis.rb
@@ -1,29 +1,31 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:verifier_failure_action).
- #
+
# === Options:
# :abort_process ::
- #
+
# :print_message ::
# verifier will print to stderr and abort()
# :return_status ::
# verifier will print to stderr and return 1
- #
+
# @method _enum_verifier_failure_action_
# @return [Symbol]
# @scope class
@@ -32,44 +34,40 @@ def self.attach_function(name, *_)
:print_message, 1,
:return_status, 2
]
-
+
# Verifies that a module is valid, taking the specified action if not.
# Optionally returns a human-readable description of any invalid constructs.
# OutMessage must be disposed with LLVMDisposeMessage.
- #
+
# @method verify_module(m, action, out_message)
- # @param [FFI::Pointer(ModuleRef)] m
- # @param [Symbol from _enum_verifier_failure_action_] action
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @param [Symbol from _enum_verifier_failure_action_] action
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :verify_module, :LLVMVerifyModule, [:pointer, :verifier_failure_action, :pointer], :int
-
# Verifies that a single function is valid, taking the specified action. Useful
# for debugging.
- #
+
# @method verify_function(fn, action)
- # @param [FFI::Pointer(ValueRef)] fn
- # @param [Symbol from _enum_verifier_failure_action_] action
- # @return [Integer]
+ # @param [FFI::Pointer(ValueRef)] fn
+ # @param [Symbol from _enum_verifier_failure_action_] action
+ # @return [Integer]
# @scope class
attach_function :verify_function, :LLVMVerifyFunction, [:pointer, :verifier_failure_action], :int
-
# Open up a ghostview window that displays the CFG of the current function.
# Useful for debugging.
- #
+
# @method view_function_cfg(fn)
- # @param [FFI::Pointer(ValueRef)] fn
- # @return [nil]
+ # @param [FFI::Pointer(ValueRef)] fn
+ # @return [nil]
# @scope class
attach_function :view_function_cfg, :LLVMViewFunctionCFG, [:pointer], :void
-
# (Not documented)
- #
+
# @method view_function_cfg_only(fn)
- # @param [FFI::Pointer(ValueRef)] fn
- # @return [nil]
+ # @param [FFI::Pointer(ValueRef)] fn
+ # @return [nil]
# @scope class
attach_function :view_function_cfg_only, :LLVMViewFunctionCFGOnly, [:pointer], :void
-
end
diff --git a/test/output/llvm-c/BitReader.rb b/test/output/llvm-c/BitReader.rb
index a47fcba..8455194 100644
--- a/test/output/llvm-c/BitReader.rb
+++ b/test/output/llvm-c/BitReader.rb
@@ -1,82 +1,78 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Builds a module from the bitcode in the specified memory buffer, returning a
# reference to the module via the OutModule parameter. Returns 0 on success.
# Optionally returns a human-readable error message via OutMessage.
- #
+
# @method parse_bitcode(mem_buf, out_module, out_message)
- # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
- # @param [FFI::Pointer(*ModuleRef)] out_module
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
+ # @param [FFI::Pointer(*ModuleRef)] out_module
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :parse_bitcode, :LLVMParseBitcode, [:pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method parse_bitcode_in_context(context_ref, mem_buf, out_module, out_message)
- # @param [FFI::Pointer(ContextRef)] context_ref
- # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
- # @param [FFI::Pointer(*ModuleRef)] out_module
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [FFI::Pointer(ContextRef)] context_ref
+ # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
+ # @param [FFI::Pointer(*ModuleRef)] out_module
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :parse_bitcode_in_context, :LLVMParseBitcodeInContext, [:pointer, :pointer, :pointer, :pointer], :int
-
# Reads a module from the specified path, returning via the OutMP parameter
# a module provider which performs lazy deserialization. Returns 0 on success.
# Optionally returns a human-readable error message via OutMessage.
- #
+
# @method get_bitcode_module_in_context(context_ref, mem_buf, out_m, out_message)
- # @param [FFI::Pointer(ContextRef)] context_ref
- # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
- # @param [FFI::Pointer(*ModuleRef)] out_m
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [FFI::Pointer(ContextRef)] context_ref
+ # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
+ # @param [FFI::Pointer(*ModuleRef)] out_m
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :get_bitcode_module_in_context, :LLVMGetBitcodeModuleInContext, [:pointer, :pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method get_bitcode_module(mem_buf, out_m, out_message)
- # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
- # @param [FFI::Pointer(*ModuleRef)] out_m
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
+ # @param [FFI::Pointer(*ModuleRef)] out_m
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :get_bitcode_module, :LLVMGetBitcodeModule, [:pointer, :pointer, :pointer], :int
-
# Deprecated: Use LLVMGetBitcodeModuleInContext instead.
- #
+
# @method get_bitcode_module_provider_in_context(context_ref, mem_buf, out_mp, out_message)
- # @param [FFI::Pointer(ContextRef)] context_ref
- # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
- # @param [FFI::Pointer(*ModuleProviderRef)] out_mp
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [FFI::Pointer(ContextRef)] context_ref
+ # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
+ # @param [FFI::Pointer(*ModuleProviderRef)] out_mp
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :get_bitcode_module_provider_in_context, :LLVMGetBitcodeModuleProviderInContext, [:pointer, :pointer, :pointer, :pointer], :int
-
# Deprecated: Use LLVMGetBitcodeModule instead.
- #
+
# @method get_bitcode_module_provider(mem_buf, out_mp, out_message)
- # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
- # @param [FFI::Pointer(*ModuleProviderRef)] out_mp
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
+ # @param [FFI::Pointer(*ModuleProviderRef)] out_mp
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :get_bitcode_module_provider, :LLVMGetBitcodeModuleProvider, [:pointer, :pointer, :pointer], :int
-
end
diff --git a/test/output/llvm-c/BitWriter.rb b/test/output/llvm-c/BitWriter.rb
index 5652018..41e4d22 100644
--- a/test/output/llvm-c/BitWriter.rb
+++ b/test/output/llvm-c/BitWriter.rb
@@ -1,45 +1,44 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# Writes a module to the specified path. Returns 0 on success.
- #
+
# @method write_bitcode_to_file(m, path)
- # @param [FFI::Pointer(ModuleRef)] m
- # @param [String] path
- # @return [Integer]
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @param [String] path
+ # @return [Integer]
# @scope class
attach_function :write_bitcode_to_file, :LLVMWriteBitcodeToFile, [:pointer, :string], :int
-
# Writes a module to an open file descriptor. Returns 0 on success.
- #
+
# @method write_bitcode_to_fd(m, fd, should_close, unbuffered)
- # @param [FFI::Pointer(ModuleRef)] m
- # @param [Integer] fd
- # @param [Integer] should_close
- # @param [Integer] unbuffered
- # @return [Integer]
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @param [Integer] fd
+ # @param [Integer] should_close
+ # @param [Integer] unbuffered
+ # @return [Integer]
# @scope class
attach_function :write_bitcode_to_fd, :LLVMWriteBitcodeToFD, [:pointer, :int, :int, :int], :int
-
# Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file
# descriptor. Returns 0 on success. Closes the Handle.
- #
+
# @method write_bitcode_to_file_handle(m, handle)
- # @param [FFI::Pointer(ModuleRef)] m
- # @param [Integer] handle
- # @return [Integer]
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @param [Integer] handle
+ # @return [Integer]
# @scope class
attach_function :write_bitcode_to_file_handle, :LLVMWriteBitcodeToFileHandle, [:pointer, :int], :int
-
end
diff --git a/test/output/llvm-c/Core.rb b/test/output/llvm-c/Core.rb
index dc8e49e..d3d18f2 100644
--- a/test/output/llvm-c/Core.rb
+++ b/test/output/llvm-c/Core.rb
@@ -1,139 +1,141 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
def for_each_value_subclass(macro)
macroARGUMENTmacroBASIC_BLOCKmacroINLINE_ASMmacroMD_NODEmacroMD_STRINGmacroUSERmacroCONSTANTmacroBLOCK_ADDRESSmacroCONSTANT_AGGREGATE_ZEROmacroCONSTANT_ARRAYmacroCONSTANT_EXPRmacroCONSTANT_FPmacroCONSTANT_INTmacroCONSTANT_POINTER_NULLmacroCONSTANT_STRUCTmacroCONSTANT_VECTORmacroGLOBAL_VALUEmacroFUNCTIONmacroGLOBAL_ALIASmacroGLOBAL_VARIABLEmacroUNDEF_VALUEmacroINSTRUCTIONmacroBINARY_OPERATORmacroCALL_INSTmacroINTRINSIC_INSTmacroDBG_INFO_INTRINSICmacroDBG_DECLARE_INSTmacroEH_EXCEPTION_INSTmacroEH_SELECTOR_INSTmacroMEM_INTRINSICmacroMEM_CPY_INSTmacroMEM_MOVE_INSTmacroMEM_SET_INSTmacroCMP_INSTmacroF_CMP_INSTmacroI_CMP_INSTmacroEXTRACT_ELEMENT_INSTmacroGET_ELEMENT_PTR_INSTmacroINSERT_ELEMENT_INSTmacroINSERT_VALUE_INSTmacroLANDING_PAD_INSTmacroPHI_NODEmacroSELECT_INSTmacroSHUFFLE_VECTOR_INSTmacroSTORE_INSTmacroTERMINATOR_INSTmacroBRANCH_INSTmacroINDIRECT_BR_INSTmacroINVOKE_INSTmacroRETURN_INSTmacroSWITCH_INSTmacroUNREACHABLE_INSTmacroRESUME_INSTmacroUNARY_INSTRUCTIONmacroALLOCA_INSTmacroCAST_INSTmacroBIT_CAST_INSTmacroFP_EXT_INSTmacroFP_TO_SI_INSTmacroFP_TO_UI_INSTmacroFP_TRUNC_INSTmacroINT_TO_PTR_INSTmacroPTR_TO_INT_INSTmacroS_EXT_INSTmacroSI_TO_FP_INSTmacroTRUNC_INSTmacroUI_TO_FP_INSTmacroZ_EXT_INSTmacroEXTRACT_VALUE_INSTmacroLOAD_INSTmacroVA_ARG_INST
end
-
+
# The top-level container for all LLVM global data. See the LLVMContext class.
class OpaqueContext < FFI::Struct
layout :dummy, :char
end
-
+
# The top-level container for all other LLVM Intermediate Representation (IR)
# objects. See the llvm::Module class.
class OpaqueModule < FFI::Struct
layout :dummy, :char
end
-
+
# Each value in the LLVM IR has a type, an LLVMTypeRef. See the llvm::Type
# class.
class OpaqueType < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class OpaqueValue < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class OpaqueBasicBlock < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class OpaqueBuilder < FFI::Struct
layout :dummy, :char
end
-
+
# Interface used to provide a module to JIT or interpreter. This is now just a
# synonym for llvm::Module, but we have to keep using the different type to
# keep binary compatibility.
class OpaqueModuleProvider < FFI::Struct
layout :dummy, :char
end
-
+
# Used to provide a module to JIT or interpreter.
# See the llvm::MemoryBuffer class.
class OpaqueMemoryBuffer < FFI::Struct
layout :dummy, :char
end
-
+
# See the llvm::PassManagerBase class.
class OpaquePassManager < FFI::Struct
layout :dummy, :char
end
-
+
# See the llvm::PassRegistry class.
class OpaquePassRegistry < FFI::Struct
layout :dummy, :char
end
-
+
# Used to get the users and usees of a Value. See the llvm::Use class.
class OpaqueUse < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:attribute).
- #
+
# === Options:
# :z_ext_attribute ::
- #
+
# :s_ext_attribute ::
- #
+
# :no_return_attribute ::
- #
+
# :in_reg_attribute ::
- #
+
# :struct_ret_attribute ::
- #
+
# :no_unwind_attribute ::
- #
+
# :no_alias_attribute ::
- #
+
# :by_val_attribute ::
- #
+
# :nest_attribute ::
- #
+
# :read_none_attribute ::
- #
+
# :read_only_attribute ::
- #
+
# :no_inline_attribute ::
- #
+
# :always_inline_attribute ::
- #
+
# :optimize_for_size_attribute ::
- #
+
# :stack_protect_attribute ::
- #
+
# :stack_protect_req_attribute ::
- #
+
# :alignment ::
- #
+
# :no_capture_attribute ::
- #
+
# :no_red_zone_attribute ::
- #
+
# :no_implicit_float_attribute ::
- #
+
# :naked_attribute ::
- #
+
# :inline_hint_attribute ::
- #
+
# :stack_alignment ::
- #
+
# :returns_twice ::
- #
+
# :uw_table ::
- #
+
# :non_lazy_bind ::
- #
- #
+
+
# @method _enum_attribute_
# @return [Symbol]
# @scope class
@@ -165,131 +167,131 @@ class OpaqueUse < FFI::Struct
:uw_table, 1073741824,
:non_lazy_bind, 2147483648
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:opcode).
- #
+
# === Options:
# :ret ::
# Terminator Instructions
# :br ::
- #
+
# :switch ::
- #
+
# :indirect_br ::
- #
+
# :invoke ::
- #
+
# :unreachable ::
# removed 6 due to API changes
# :add ::
# Standard Binary Operators
# :f_add ::
- #
+
# :sub ::
- #
+
# :f_sub ::
- #
+
# :mul ::
- #
+
# :f_mul ::
- #
+
# :u_div ::
- #
+
# :s_div ::
- #
+
# :f_div ::
- #
+
# :u_rem ::
- #
+
# :s_rem ::
- #
+
# :f_rem ::
- #
+
# :shl ::
# Logical Operators
# :l_shr ::
- #
+
# :a_shr ::
- #
+
# :and_ ::
- #
+
# :or_ ::
- #
+
# :xor ::
- #
+
# :alloca ::
# Memory Operators
# :load ::
- #
+
# :store ::
- #
+
# :get_element_ptr ::
- #
+
# :trunc ::
# Cast Operators
# :z_ext ::
- #
+
# :s_ext ::
- #
+
# :fp_to_ui ::
- #
+
# :fp_to_si ::
- #
+
# :ui_to_fp ::
- #
+
# :si_to_fp ::
- #
+
# :fp_trunc ::
- #
+
# :fp_ext ::
- #
+
# :ptr_to_int ::
- #
+
# :int_to_ptr ::
- #
+
# :bit_cast ::
- #
+
# :i_cmp ::
# Other Operators
# :f_cmp ::
- #
+
# :phi ::
- #
+
# :call ::
- #
+
# :select ::
- #
+
# :user_op1 ::
- #
+
# :user_op2 ::
- #
+
# :va_arg ::
- #
+
# :extract_element ::
- #
+
# :insert_element ::
- #
+
# :shuffle_vector ::
- #
+
# :extract_value ::
- #
+
# :insert_value ::
- #
+
# :fence ::
# Atomic operators
# :atomic_cmp_xchg ::
- #
+
# :atomic_rmw ::
- #
+
# :resume ::
# Exception Handling Operators
# :landing_pad ::
- #
+
# :unwind ::
- #
- #
+
+
# @method _enum_opcode_
# @return [Symbol]
# @scope class
@@ -354,14 +356,14 @@ class OpaqueUse < FFI::Struct
:landing_pad, 59,
:unwind, 60
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:type_kind).
- #
+
# === Options:
# :void ::
- #
+
# :float ::
# < type with no size
# :double ::
@@ -390,7 +392,7 @@ class OpaqueUse < FFI::Struct
# < SIMD 'packed' format, or other vector type
# :x86_mmx ::
# < Metadata
- #
+
# @method _enum_type_kind_
# @return [Symbol]
# @scope class
@@ -411,18 +413,18 @@ class OpaqueUse < FFI::Struct
:metadata, 13,
:x86_mmx, 14
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:linkage).
- #
+
# === Options:
# :external ::
- #
+
# :available_externally ::
# < Externally visible function
# :link_once_any ::
- #
+
# :link_once_odr ::
# < Keep one copy of function when linking (inline)
# :weak_any ::
@@ -454,7 +456,7 @@ class OpaqueUse < FFI::Struct
# < Like Private, but linker removes.
# :linker_private_weak_def_auto ::
# < Like LinkerPrivate, but is weak.
- #
+
# @method _enum_linkage_
# @return [Symbol]
# @scope class
@@ -477,19 +479,19 @@ class OpaqueUse < FFI::Struct
:linker_private_weak, 15,
:linker_private_weak_def_auto, 16
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:visibility).
- #
+
# === Options:
# :default ::
- #
+
# :hidden ::
# < The GV is visible
# :protected ::
# < The GV is hidden
- #
+
# @method _enum_visibility_
# @return [Symbol]
# @scope class
@@ -498,23 +500,23 @@ class OpaqueUse < FFI::Struct
:hidden, 1,
:protected, 2
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:call_conv).
- #
+
# === Options:
# :c ::
- #
+
# :fast ::
- #
+
# :cold ::
- #
+
# :x86_stdcall ::
- #
+
# :x86_fastcall ::
- #
- #
+
+
# @method _enum_call_conv_
# @return [Symbol]
# @scope class
@@ -525,14 +527,14 @@ class OpaqueUse < FFI::Struct
:x86_stdcall, 64,
:x86_fastcall, 65
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:int_predicate).
- #
+
# === Options:
# :eq ::
- #
+
# :ne ::
# < equal
# :ugt ::
@@ -551,7 +553,7 @@ class OpaqueUse < FFI::Struct
# < signed greater or equal
# :sle ::
# < signed less than
- #
+
# @method _enum_int_predicate_
# @return [Symbol]
# @scope class
@@ -567,14 +569,14 @@ class OpaqueUse < FFI::Struct
:slt, 40,
:sle, 41
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:real_predicate).
- #
+
# === Options:
# :predicate_false ::
- #
+
# :oeq ::
# < Always false (always folded)
# :ogt ::
@@ -605,7 +607,7 @@ class OpaqueUse < FFI::Struct
# < True if unordered, less than, or equal
# :predicate_true ::
# < True if unordered or not equal
- #
+
# @method _enum_real_predicate_
# @return [Symbol]
# @scope class
@@ -627,17 +629,17 @@ class OpaqueUse < FFI::Struct
:une, 14,
:predicate_true, 15
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:landing_pad_clause_ty).
- #
+
# === Options:
# :catch ::
- #
+
# :filter ::
# < A catch clause
- #
+
# @method _enum_landing_pad_clause_ty_
# @return [Symbol]
# @scope class
@@ -645,4159 +647,3200 @@ class OpaqueUse < FFI::Struct
:catch, 0,
:filter, 1
]
-
+
# (Not documented)
- #
+
# @method initialize_core(r)
- # @param [OpaquePassRegistry] r
- # @return [nil]
+ # @param [OpaquePassRegistry] r
+ # @return [nil]
# @scope class
attach_function :initialize_core, :LLVMInitializeCore, [OpaquePassRegistry], :void
-
# ===-- Error handling ----------------------------------------------------===
- #
+
# @method dispose_message(message)
- # @param [String] message
- # @return [nil]
+ # @param [String] message
+ # @return [nil]
# @scope class
attach_function :dispose_message, :LLVMDisposeMessage, [:string], :void
-
# Create and destroy contexts.
- #
+
# @method context_create()
- # @return [OpaqueContext]
+ # @return [OpaqueContext]
# @scope class
attach_function :context_create, :LLVMContextCreate, [], OpaqueContext
-
# (Not documented)
- #
+
# @method get_global_context()
- # @return [OpaqueContext]
+ # @return [OpaqueContext]
# @scope class
attach_function :get_global_context, :LLVMGetGlobalContext, [], OpaqueContext
-
# (Not documented)
- #
+
# @method context_dispose(c)
- # @param [OpaqueContext] c
- # @return [nil]
+ # @param [OpaqueContext] c
+ # @return [nil]
# @scope class
attach_function :context_dispose, :LLVMContextDispose, [OpaqueContext], :void
-
# (Not documented)
- #
+
# @method get_md_kind_id_in_context(c, name, s_len)
- # @param [OpaqueContext] c
- # @param [String] name
- # @param [Integer] s_len
- # @return [Integer]
+ # @param [OpaqueContext] c
+ # @param [String] name
+ # @param [Integer] s_len
+ # @return [Integer]
# @scope class
attach_function :get_md_kind_id_in_context, :LLVMGetMDKindIDInContext, [OpaqueContext, :string, :uint], :uint
-
# (Not documented)
- #
+
# @method get_md_kind_id(name, s_len)
- # @param [String] name
- # @param [Integer] s_len
- # @return [Integer]
+ # @param [String] name
+ # @param [Integer] s_len
+ # @return [Integer]
# @scope class
attach_function :get_md_kind_id, :LLVMGetMDKindID, [:string, :uint], :uint
-
# See llvm::Module::Module.
- #
+
# @method module_create_with_name(module_id)
- # @param [String] module_id
- # @return [OpaqueModule]
+ # @param [String] module_id
+ # @return [OpaqueModule]
# @scope class
attach_function :module_create_with_name, :LLVMModuleCreateWithName, [:string], OpaqueModule
-
# (Not documented)
- #
+
# @method module_create_with_name_in_context(module_id, c)
- # @param [String] module_id
- # @param [OpaqueContext] c
- # @return [OpaqueModule]
+ # @param [String] module_id
+ # @param [OpaqueContext] c
+ # @return [OpaqueModule]
# @scope class
attach_function :module_create_with_name_in_context, :LLVMModuleCreateWithNameInContext, [:string, OpaqueContext], OpaqueModule
-
# See llvm::Module::~Module.
- #
+
# @method dispose_module(m)
- # @param [OpaqueModule] m
- # @return [nil]
+ # @param [OpaqueModule] m
+ # @return [nil]
# @scope class
attach_function :dispose_module, :LLVMDisposeModule, [OpaqueModule], :void
-
# Data layout. See Module::getDataLayout.
- #
+
# @method get_data_layout(m)
- # @param [OpaqueModule] m
- # @return [String]
+ # @param [OpaqueModule] m
+ # @return [String]
# @scope class
attach_function :get_data_layout, :LLVMGetDataLayout, [OpaqueModule], :string
-
# (Not documented)
- #
+
# @method set_data_layout(m, triple)
- # @param [OpaqueModule] m
- # @param [String] triple
- # @return [nil]
+ # @param [OpaqueModule] m
+ # @param [String] triple
+ # @return [nil]
# @scope class
attach_function :set_data_layout, :LLVMSetDataLayout, [OpaqueModule, :string], :void
-
# Target triple. See Module::getTargetTriple.
- #
+
# @method get_target(m)
- # @param [OpaqueModule] m
- # @return [String]
+ # @param [OpaqueModule] m
+ # @return [String]
# @scope class
attach_function :get_target, :LLVMGetTarget, [OpaqueModule], :string
-
# (Not documented)
- #
+
# @method set_target(m, triple)
- # @param [OpaqueModule] m
- # @param [String] triple
- # @return [nil]
+ # @param [OpaqueModule] m
+ # @param [String] triple
+ # @return [nil]
# @scope class
attach_function :set_target, :LLVMSetTarget, [OpaqueModule, :string], :void
-
# See Module::dump.
- #
+
# @method dump_module(m)
- # @param [OpaqueModule] m
- # @return [nil]
+ # @param [OpaqueModule] m
+ # @return [nil]
# @scope class
attach_function :dump_module, :LLVMDumpModule, [OpaqueModule], :void
-
# See Module::setModuleInlineAsm.
- #
+
# @method set_module_inline_asm(m, asm)
- # @param [OpaqueModule] m
- # @param [String] asm
- # @return [nil]
+ # @param [OpaqueModule] m
+ # @param [String] asm
+ # @return [nil]
# @scope class
attach_function :set_module_inline_asm, :LLVMSetModuleInlineAsm, [OpaqueModule, :string], :void
-
# See Module::getContext.
- #
+
# @method get_module_context(m)
- # @param [OpaqueModule] m
- # @return [OpaqueContext]
+ # @param [OpaqueModule] m
+ # @return [OpaqueContext]
# @scope class
attach_function :get_module_context, :LLVMGetModuleContext, [OpaqueModule], OpaqueContext
-
# See llvm::LLVMTypeKind::getTypeID.
- #
+
# @method get_type_kind(ty)
- # @param [OpaqueType] ty
- # @return [Symbol from _enum_type_kind_]
+ # @param [OpaqueType] ty
+ # @return [Symbol from _enum_type_kind_]
# @scope class
attach_function :get_type_kind, :LLVMGetTypeKind, [OpaqueType], :type_kind
-
# (Not documented)
- #
+
# @method type_is_sized(ty)
- # @param [OpaqueType] ty
- # @return [Integer]
+ # @param [OpaqueType] ty
+ # @return [Integer]
# @scope class
attach_function :type_is_sized, :LLVMTypeIsSized, [OpaqueType], :int
-
# See llvm::LLVMType::getContext.
- #
+
# @method get_type_context(ty)
- # @param [OpaqueType] ty
- # @return [OpaqueContext]
+ # @param [OpaqueType] ty
+ # @return [OpaqueContext]
# @scope class
attach_function :get_type_context, :LLVMGetTypeContext, [OpaqueType], OpaqueContext
-
# Operations on integer types
- #
+
# @method int1_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :int1_type_in_context, :LLVMInt1TypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method int8_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :int8_type_in_context, :LLVMInt8TypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method int16_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :int16_type_in_context, :LLVMInt16TypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method int32_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :int32_type_in_context, :LLVMInt32TypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method int64_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :int64_type_in_context, :LLVMInt64TypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method int_type_in_context(c, num_bits)
- # @param [OpaqueContext] c
- # @param [Integer] num_bits
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @param [Integer] num_bits
+ # @return [OpaqueType]
# @scope class
attach_function :int_type_in_context, :LLVMIntTypeInContext, [OpaqueContext, :uint], OpaqueType
-
# (Not documented)
- #
+
# @method int1_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :int1_type, :LLVMInt1Type, [], OpaqueType
-
# (Not documented)
- #
+
# @method int8_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :int8_type, :LLVMInt8Type, [], OpaqueType
-
# (Not documented)
- #
+
# @method int16_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :int16_type, :LLVMInt16Type, [], OpaqueType
-
# (Not documented)
- #
+
# @method int32_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :int32_type, :LLVMInt32Type, [], OpaqueType
-
# (Not documented)
- #
+
# @method int64_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :int64_type, :LLVMInt64Type, [], OpaqueType
-
# (Not documented)
- #
+
# @method int_type(num_bits)
- # @param [Integer] num_bits
- # @return [OpaqueType]
+ # @param [Integer] num_bits
+ # @return [OpaqueType]
# @scope class
attach_function :int_type, :LLVMIntType, [:uint], OpaqueType
-
# (Not documented)
- #
+
# @method get_int_type_width(integer_ty)
- # @param [OpaqueType] integer_ty
- # @return [Integer]
+ # @param [OpaqueType] integer_ty
+ # @return [Integer]
# @scope class
attach_function :get_int_type_width, :LLVMGetIntTypeWidth, [OpaqueType], :uint
-
# Operations on real types
- #
+
# @method float_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :float_type_in_context, :LLVMFloatTypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method double_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :double_type_in_context, :LLVMDoubleTypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method x86fp80_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :x86fp80_type_in_context, :LLVMX86FP80TypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method fp128_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :fp128_type_in_context, :LLVMFP128TypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method ppcfp128_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :ppcfp128_type_in_context, :LLVMPPCFP128TypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method float_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :float_type, :LLVMFloatType, [], OpaqueType
-
# (Not documented)
- #
+
# @method double_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :double_type, :LLVMDoubleType, [], OpaqueType
-
# (Not documented)
- #
+
# @method x86fp80_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :x86fp80_type, :LLVMX86FP80Type, [], OpaqueType
-
# (Not documented)
- #
+
# @method fp128_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :fp128_type, :LLVMFP128Type, [], OpaqueType
-
# (Not documented)
- #
+
# @method ppcfp128_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :ppcfp128_type, :LLVMPPCFP128Type, [], OpaqueType
-
# Operations on function types
- #
+
# @method function_type(return_type, param_types, param_count, is_var_arg)
- # @param [OpaqueType] return_type
- # @param [FFI::Pointer(*TypeRef)] param_types
- # @param [Integer] param_count
- # @param [Integer] is_var_arg
- # @return [OpaqueType]
+ # @param [OpaqueType] return_type
+ # @param [FFI::Pointer(*TypeRef)] param_types
+ # @param [Integer] param_count
+ # @param [Integer] is_var_arg
+ # @return [OpaqueType]
# @scope class
attach_function :function_type, :LLVMFunctionType, [OpaqueType, :pointer, :uint, :int], OpaqueType
-
# (Not documented)
- #
+
# @method is_function_var_arg(function_ty)
- # @param [OpaqueType] function_ty
- # @return [Integer]
+ # @param [OpaqueType] function_ty
+ # @return [Integer]
# @scope class
attach_function :is_function_var_arg, :LLVMIsFunctionVarArg, [OpaqueType], :int
-
# (Not documented)
- #
+
# @method get_return_type(function_ty)
- # @param [OpaqueType] function_ty
- # @return [OpaqueType]
+ # @param [OpaqueType] function_ty
+ # @return [OpaqueType]
# @scope class
attach_function :get_return_type, :LLVMGetReturnType, [OpaqueType], OpaqueType
-
# (Not documented)
- #
+
# @method count_param_types(function_ty)
- # @param [OpaqueType] function_ty
- # @return [Integer]
+ # @param [OpaqueType] function_ty
+ # @return [Integer]
# @scope class
attach_function :count_param_types, :LLVMCountParamTypes, [OpaqueType], :uint
-
# (Not documented)
- #
+
# @method get_param_types(function_ty, dest)
- # @param [OpaqueType] function_ty
- # @param [FFI::Pointer(*TypeRef)] dest
- # @return [nil]
+ # @param [OpaqueType] function_ty
+ # @param [FFI::Pointer(*TypeRef)] dest
+ # @return [nil]
# @scope class
attach_function :get_param_types, :LLVMGetParamTypes, [OpaqueType, :pointer], :void
-
# Operations on struct types
- #
+
# @method struct_type_in_context(c, element_types, element_count, packed)
- # @param [OpaqueContext] c
- # @param [FFI::Pointer(*TypeRef)] element_types
- # @param [Integer] element_count
- # @param [Integer] packed
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @param [FFI::Pointer(*TypeRef)] element_types
+ # @param [Integer] element_count
+ # @param [Integer] packed
+ # @return [OpaqueType]
# @scope class
attach_function :struct_type_in_context, :LLVMStructTypeInContext, [OpaqueContext, :pointer, :uint, :int], OpaqueType
-
# (Not documented)
- #
+
# @method struct_type(element_types, element_count, packed)
- # @param [FFI::Pointer(*TypeRef)] element_types
- # @param [Integer] element_count
- # @param [Integer] packed
- # @return [OpaqueType]
+ # @param [FFI::Pointer(*TypeRef)] element_types
+ # @param [Integer] element_count
+ # @param [Integer] packed
+ # @return [OpaqueType]
# @scope class
attach_function :struct_type, :LLVMStructType, [:pointer, :uint, :int], OpaqueType
-
# (Not documented)
- #
+
# @method struct_create_named(c, name)
- # @param [OpaqueContext] c
- # @param [String] name
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @param [String] name
+ # @return [OpaqueType]
# @scope class
attach_function :struct_create_named, :LLVMStructCreateNamed, [OpaqueContext, :string], OpaqueType
-
# (Not documented)
- #
+
# @method get_struct_name(ty)
- # @param [OpaqueType] ty
- # @return [String]
+ # @param [OpaqueType] ty
+ # @return [String]
# @scope class
attach_function :get_struct_name, :LLVMGetStructName, [OpaqueType], :string
-
# (Not documented)
- #
+
# @method struct_set_body(struct_ty, element_types, element_count, packed)
- # @param [OpaqueType] struct_ty
- # @param [FFI::Pointer(*TypeRef)] element_types
- # @param [Integer] element_count
- # @param [Integer] packed
- # @return [nil]
+ # @param [OpaqueType] struct_ty
+ # @param [FFI::Pointer(*TypeRef)] element_types
+ # @param [Integer] element_count
+ # @param [Integer] packed
+ # @return [nil]
# @scope class
attach_function :struct_set_body, :LLVMStructSetBody, [OpaqueType, :pointer, :uint, :int], :void
-
# (Not documented)
- #
+
# @method count_struct_element_types(struct_ty)
- # @param [OpaqueType] struct_ty
- # @return [Integer]
+ # @param [OpaqueType] struct_ty
+ # @return [Integer]
# @scope class
attach_function :count_struct_element_types, :LLVMCountStructElementTypes, [OpaqueType], :uint
-
# (Not documented)
- #
+
# @method get_struct_element_types(struct_ty, dest)
- # @param [OpaqueType] struct_ty
- # @param [FFI::Pointer(*TypeRef)] dest
- # @return [nil]
+ # @param [OpaqueType] struct_ty
+ # @param [FFI::Pointer(*TypeRef)] dest
+ # @return [nil]
# @scope class
attach_function :get_struct_element_types, :LLVMGetStructElementTypes, [OpaqueType, :pointer], :void
-
# (Not documented)
- #
+
# @method is_packed_struct(struct_ty)
- # @param [OpaqueType] struct_ty
- # @return [Integer]
+ # @param [OpaqueType] struct_ty
+ # @return [Integer]
# @scope class
attach_function :is_packed_struct, :LLVMIsPackedStruct, [OpaqueType], :int
-
# (Not documented)
- #
+
# @method is_opaque_struct(struct_ty)
- # @param [OpaqueType] struct_ty
- # @return [Integer]
+ # @param [OpaqueType] struct_ty
+ # @return [Integer]
# @scope class
attach_function :is_opaque_struct, :LLVMIsOpaqueStruct, [OpaqueType], :int
-
# (Not documented)
- #
+
# @method get_type_by_name(m, name)
- # @param [OpaqueModule] m
- # @param [String] name
- # @return [OpaqueType]
+ # @param [OpaqueModule] m
+ # @param [String] name
+ # @return [OpaqueType]
# @scope class
attach_function :get_type_by_name, :LLVMGetTypeByName, [OpaqueModule, :string], OpaqueType
-
# Operations on array, pointer, and vector types (sequence types)
- #
+
# @method array_type(element_type, element_count)
- # @param [OpaqueType] element_type
- # @param [Integer] element_count
- # @return [OpaqueType]
+ # @param [OpaqueType] element_type
+ # @param [Integer] element_count
+ # @return [OpaqueType]
# @scope class
attach_function :array_type, :LLVMArrayType, [OpaqueType, :uint], OpaqueType
-
# (Not documented)
- #
+
# @method pointer_type(element_type, address_space)
- # @param [OpaqueType] element_type
- # @param [Integer] address_space
- # @return [OpaqueType]
+ # @param [OpaqueType] element_type
+ # @param [Integer] address_space
+ # @return [OpaqueType]
# @scope class
attach_function :pointer_type, :LLVMPointerType, [OpaqueType, :uint], OpaqueType
-
# (Not documented)
- #
+
# @method vector_type(element_type, element_count)
- # @param [OpaqueType] element_type
- # @param [Integer] element_count
- # @return [OpaqueType]
+ # @param [OpaqueType] element_type
+ # @param [Integer] element_count
+ # @return [OpaqueType]
# @scope class
attach_function :vector_type, :LLVMVectorType, [OpaqueType, :uint], OpaqueType
-
# (Not documented)
- #
+
# @method get_element_type(ty)
- # @param [OpaqueType] ty
- # @return [OpaqueType]
+ # @param [OpaqueType] ty
+ # @return [OpaqueType]
# @scope class
attach_function :get_element_type, :LLVMGetElementType, [OpaqueType], OpaqueType
-
# (Not documented)
- #
+
# @method get_array_length(array_ty)
- # @param [OpaqueType] array_ty
- # @return [Integer]
+ # @param [OpaqueType] array_ty
+ # @return [Integer]
# @scope class
attach_function :get_array_length, :LLVMGetArrayLength, [OpaqueType], :uint
-
# (Not documented)
- #
+
# @method get_pointer_address_space(pointer_ty)
- # @param [OpaqueType] pointer_ty
- # @return [Integer]
+ # @param [OpaqueType] pointer_ty
+ # @return [Integer]
# @scope class
attach_function :get_pointer_address_space, :LLVMGetPointerAddressSpace, [OpaqueType], :uint
-
# (Not documented)
- #
+
# @method get_vector_size(vector_ty)
- # @param [OpaqueType] vector_ty
- # @return [Integer]
+ # @param [OpaqueType] vector_ty
+ # @return [Integer]
# @scope class
attach_function :get_vector_size, :LLVMGetVectorSize, [OpaqueType], :uint
-
# Operations on other types
- #
+
# @method void_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :void_type_in_context, :LLVMVoidTypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method label_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :label_type_in_context, :LLVMLabelTypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method x86mmx_type_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueType]
+ # @param [OpaqueContext] c
+ # @return [OpaqueType]
# @scope class
attach_function :x86mmx_type_in_context, :LLVMX86MMXTypeInContext, [OpaqueContext], OpaqueType
-
# (Not documented)
- #
+
# @method void_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :void_type, :LLVMVoidType, [], OpaqueType
-
# (Not documented)
- #
+
# @method label_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :label_type, :LLVMLabelType, [], OpaqueType
-
# (Not documented)
- #
+
# @method x86mmx_type()
- # @return [OpaqueType]
+ # @return [OpaqueType]
# @scope class
attach_function :x86mmx_type, :LLVMX86MMXType, [], OpaqueType
-
# Operations on all values
- #
+
# @method type_of(val)
- # @param [OpaqueValue] val
- # @return [OpaqueType]
+ # @param [OpaqueValue] val
+ # @return [OpaqueType]
# @scope class
attach_function :type_of, :LLVMTypeOf, [OpaqueValue], OpaqueType
-
# (Not documented)
- #
+
# @method get_value_name(val)
- # @param [OpaqueValue] val
- # @return [String]
+ # @param [OpaqueValue] val
+ # @return [String]
# @scope class
attach_function :get_value_name, :LLVMGetValueName, [OpaqueValue], :string
-
# (Not documented)
- #
+
# @method set_value_name(val, name)
- # @param [OpaqueValue] val
- # @param [String] name
- # @return [nil]
+ # @param [OpaqueValue] val
+ # @param [String] name
+ # @return [nil]
# @scope class
attach_function :set_value_name, :LLVMSetValueName, [OpaqueValue, :string], :void
-
# (Not documented)
- #
+
# @method dump_value(val)
- # @param [OpaqueValue] val
- # @return [nil]
+ # @param [OpaqueValue] val
+ # @return [nil]
# @scope class
attach_function :dump_value, :LLVMDumpValue, [OpaqueValue], :void
-
# (Not documented)
- #
+
# @method replace_all_uses_with(old_val, new_val)
- # @param [OpaqueValue] old_val
- # @param [OpaqueValue] new_val
- # @return [nil]
+ # @param [OpaqueValue] old_val
+ # @param [OpaqueValue] new_val
+ # @return [nil]
# @scope class
attach_function :replace_all_uses_with, :LLVMReplaceAllUsesWith, [OpaqueValue, OpaqueValue], :void
-
# (Not documented)
- #
+
# @method has_metadata(val)
- # @param [OpaqueValue] val
- # @return [Integer]
+ # @param [OpaqueValue] val
+ # @return [Integer]
# @scope class
attach_function :has_metadata, :LLVMHasMetadata, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method get_metadata(val, kind_id)
- # @param [OpaqueValue] val
- # @param [Integer] kind_id
- # @return [OpaqueValue]
+ # @param [OpaqueValue] val
+ # @param [Integer] kind_id
+ # @return [OpaqueValue]
# @scope class
attach_function :get_metadata, :LLVMGetMetadata, [OpaqueValue, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method set_metadata(val, kind_id, node)
- # @param [OpaqueValue] val
- # @param [Integer] kind_id
- # @param [OpaqueValue] node
- # @return [nil]
+ # @param [OpaqueValue] val
+ # @param [Integer] kind_id
+ # @param [OpaqueValue] node
+ # @return [nil]
# @scope class
attach_function :set_metadata, :LLVMSetMetadata, [OpaqueValue, :uint, OpaqueValue], :void
-
- # (Not documented)
- #
- # @method is_a_argument(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_argument, :LLVMIsAArgument, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_basic_block(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_basic_block, :LLVMIsABasicBlock, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_inline_asm(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_inline_asm, :LLVMIsAInlineAsm, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_amd_node(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_amd_node, :LLVMIsAMDNode, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_amd_string(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_amd_string, :LLVMIsAMDString, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_user(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_user, :LLVMIsAUser, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant, :LLVMIsAConstant, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_block_address(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_block_address, :LLVMIsABlockAddress, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant_aggregate_zero(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant_aggregate_zero, :LLVMIsAConstantAggregateZero, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant_array(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant_array, :LLVMIsAConstantArray, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant_expr(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant_expr, :LLVMIsAConstantExpr, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant_fp(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant_fp, :LLVMIsAConstantFP, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant_int(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant_int, :LLVMIsAConstantInt, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant_pointer_null(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant_pointer_null, :LLVMIsAConstantPointerNull, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant_struct(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant_struct, :LLVMIsAConstantStruct, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_constant_vector(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_constant_vector, :LLVMIsAConstantVector, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_global_value(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_global_value, :LLVMIsAGlobalValue, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_function(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_function, :LLVMIsAFunction, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_global_alias(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_global_alias, :LLVMIsAGlobalAlias, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_global_variable(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_global_variable, :LLVMIsAGlobalVariable, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_undef_value(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_undef_value, :LLVMIsAUndefValue, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_instruction(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_instruction, :LLVMIsAInstruction, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_binary_operator(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_binary_operator, :LLVMIsABinaryOperator, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_call_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_call_inst, :LLVMIsACallInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_intrinsic_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_intrinsic_inst, :LLVMIsAIntrinsicInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_dbg_info_intrinsic(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_dbg_info_intrinsic, :LLVMIsADbgInfoIntrinsic, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_dbg_declare_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_dbg_declare_inst, :LLVMIsADbgDeclareInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_aeh_exception_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_aeh_exception_inst, :LLVMIsAEHExceptionInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_aeh_selector_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_aeh_selector_inst, :LLVMIsAEHSelectorInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_mem_intrinsic(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_mem_intrinsic, :LLVMIsAMemIntrinsic, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_mem_cpy_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_mem_cpy_inst, :LLVMIsAMemCpyInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_mem_move_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_mem_move_inst, :LLVMIsAMemMoveInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_mem_set_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_mem_set_inst, :LLVMIsAMemSetInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_cmp_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_cmp_inst, :LLVMIsACmpInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_af_cmp_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_af_cmp_inst, :LLVMIsAFCmpInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_ai_cmp_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_ai_cmp_inst, :LLVMIsAICmpInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_extract_element_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_extract_element_inst, :LLVMIsAExtractElementInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_get_element_ptr_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_get_element_ptr_inst, :LLVMIsAGetElementPtrInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_insert_element_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_insert_element_inst, :LLVMIsAInsertElementInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_insert_value_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_insert_value_inst, :LLVMIsAInsertValueInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_landing_pad_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_landing_pad_inst, :LLVMIsALandingPadInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_aphi_node(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_aphi_node, :LLVMIsAPHINode, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_select_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_select_inst, :LLVMIsASelectInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_shuffle_vector_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_shuffle_vector_inst, :LLVMIsAShuffleVectorInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_store_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_store_inst, :LLVMIsAStoreInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_terminator_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_terminator_inst, :LLVMIsATerminatorInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_branch_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_branch_inst, :LLVMIsABranchInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_indirect_br_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_indirect_br_inst, :LLVMIsAIndirectBrInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_invoke_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_invoke_inst, :LLVMIsAInvokeInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_return_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_return_inst, :LLVMIsAReturnInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_switch_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_switch_inst, :LLVMIsASwitchInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_unreachable_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_unreachable_inst, :LLVMIsAUnreachableInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_resume_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_resume_inst, :LLVMIsAResumeInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_unary_instruction(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_unary_instruction, :LLVMIsAUnaryInstruction, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_alloca_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_alloca_inst, :LLVMIsAAllocaInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_cast_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_cast_inst, :LLVMIsACastInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_bit_cast_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_bit_cast_inst, :LLVMIsABitCastInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_afp_ext_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_afp_ext_inst, :LLVMIsAFPExtInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_afp_to_si_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_afp_to_si_inst, :LLVMIsAFPToSIInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_afp_to_ui_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_afp_to_ui_inst, :LLVMIsAFPToUIInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_afp_trunc_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_afp_trunc_inst, :LLVMIsAFPTruncInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_int_to_ptr_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_int_to_ptr_inst, :LLVMIsAIntToPtrInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_ptr_to_int_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_ptr_to_int_inst, :LLVMIsAPtrToIntInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_as_ext_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_as_ext_inst, :LLVMIsASExtInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_asi_to_fp_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_asi_to_fp_inst, :LLVMIsASIToFPInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_trunc_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_trunc_inst, :LLVMIsATruncInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_aui_to_fp_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_aui_to_fp_inst, :LLVMIsAUIToFPInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_az_ext_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_az_ext_inst, :LLVMIsAZExtInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_extract_value_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_extract_value_inst, :LLVMIsAExtractValueInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_a_load_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_a_load_inst, :LLVMIsALoadInst, [OpaqueValue], OpaqueValue
-
- # (Not documented)
- #
- # @method is_ava_arg_inst(val)
- # @param [OpaqueValue] val
- # @return [OpaqueValue]
- # @scope class
- attach_function :is_ava_arg_inst, :LLVMIsAVAArgInst, [OpaqueValue], OpaqueValue
-
# Operations on Uses
- #
+
# @method get_first_use(val)
- # @param [OpaqueValue] val
- # @return [OpaqueUse]
+ # @param [OpaqueValue] val
+ # @return [OpaqueUse]
# @scope class
attach_function :get_first_use, :LLVMGetFirstUse, [OpaqueValue], OpaqueUse
-
# (Not documented)
- #
+
# @method get_next_use(u)
- # @param [OpaqueUse] u
- # @return [OpaqueUse]
+ # @param [OpaqueUse] u
+ # @return [OpaqueUse]
# @scope class
attach_function :get_next_use, :LLVMGetNextUse, [OpaqueUse], OpaqueUse
-
# (Not documented)
- #
+
# @method get_user(u)
- # @param [OpaqueUse] u
- # @return [OpaqueValue]
+ # @param [OpaqueUse] u
+ # @return [OpaqueValue]
# @scope class
attach_function :get_user, :LLVMGetUser, [OpaqueUse], OpaqueValue
-
# (Not documented)
- #
+
# @method get_used_value(u)
- # @param [OpaqueUse] u
- # @return [OpaqueValue]
+ # @param [OpaqueUse] u
+ # @return [OpaqueValue]
# @scope class
attach_function :get_used_value, :LLVMGetUsedValue, [OpaqueUse], OpaqueValue
-
# Operations on Users
- #
+
# @method get_operand(val, index)
- # @param [OpaqueValue] val
- # @param [Integer] index
- # @return [OpaqueValue]
+ # @param [OpaqueValue] val
+ # @param [Integer] index
+ # @return [OpaqueValue]
# @scope class
attach_function :get_operand, :LLVMGetOperand, [OpaqueValue, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method set_operand(user, index, val)
- # @param [OpaqueValue] user
- # @param [Integer] index
- # @param [OpaqueValue] val
- # @return [nil]
+ # @param [OpaqueValue] user
+ # @param [Integer] index
+ # @param [OpaqueValue] val
+ # @return [nil]
# @scope class
attach_function :set_operand, :LLVMSetOperand, [OpaqueValue, :uint, OpaqueValue], :void
-
# (Not documented)
- #
+
# @method get_num_operands(val)
- # @param [OpaqueValue] val
- # @return [Integer]
+ # @param [OpaqueValue] val
+ # @return [Integer]
# @scope class
attach_function :get_num_operands, :LLVMGetNumOperands, [OpaqueValue], :int
-
# Operations on constants of any type
- #
+
# @method const_null(ty)
- # @param [OpaqueType] ty
- # @return [OpaqueValue]
+ # @param [OpaqueType] ty
+ # @return [OpaqueValue]
# @scope class
attach_function :const_null, :LLVMConstNull, [OpaqueType], OpaqueValue
-
# all zeroes
- #
+
# @method const_all_ones(ty)
- # @param [OpaqueType] ty
- # @return [OpaqueValue]
+ # @param [OpaqueType] ty
+ # @return [OpaqueValue]
# @scope class
attach_function :const_all_ones, :LLVMConstAllOnes, [OpaqueType], OpaqueValue
-
# only for int/vector
- #
+
# @method get_undef(ty)
- # @param [OpaqueType] ty
- # @return [OpaqueValue]
+ # @param [OpaqueType] ty
+ # @return [OpaqueValue]
# @scope class
attach_function :get_undef, :LLVMGetUndef, [OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method is_constant(val)
- # @param [OpaqueValue] val
- # @return [Integer]
+ # @param [OpaqueValue] val
+ # @return [Integer]
# @scope class
attach_function :is_constant, :LLVMIsConstant, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method is_null(val)
- # @param [OpaqueValue] val
- # @return [Integer]
+ # @param [OpaqueValue] val
+ # @return [Integer]
# @scope class
attach_function :is_null, :LLVMIsNull, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method is_undef(val)
- # @param [OpaqueValue] val
- # @return [Integer]
+ # @param [OpaqueValue] val
+ # @return [Integer]
# @scope class
attach_function :is_undef, :LLVMIsUndef, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method const_pointer_null(ty)
- # @param [OpaqueType] ty
- # @return [OpaqueValue]
+ # @param [OpaqueType] ty
+ # @return [OpaqueValue]
# @scope class
attach_function :const_pointer_null, :LLVMConstPointerNull, [OpaqueType], OpaqueValue
-
# Operations on metadata
- #
+
# @method md_string_in_context(c, str, s_len)
- # @param [OpaqueContext] c
- # @param [String] str
- # @param [Integer] s_len
- # @return [OpaqueValue]
+ # @param [OpaqueContext] c
+ # @param [String] str
+ # @param [Integer] s_len
+ # @return [OpaqueValue]
# @scope class
attach_function :md_string_in_context, :LLVMMDStringInContext, [OpaqueContext, :string, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method md_string(str, s_len)
- # @param [String] str
- # @param [Integer] s_len
- # @return [OpaqueValue]
+ # @param [String] str
+ # @param [Integer] s_len
+ # @return [OpaqueValue]
# @scope class
attach_function :md_string, :LLVMMDString, [:string, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method md_node_in_context(c, vals, count)
- # @param [OpaqueContext] c
- # @param [FFI::Pointer(*ValueRef)] vals
- # @param [Integer] count
- # @return [OpaqueValue]
+ # @param [OpaqueContext] c
+ # @param [FFI::Pointer(*ValueRef)] vals
+ # @param [Integer] count
+ # @return [OpaqueValue]
# @scope class
attach_function :md_node_in_context, :LLVMMDNodeInContext, [OpaqueContext, :pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method md_node(vals, count)
- # @param [FFI::Pointer(*ValueRef)] vals
- # @param [Integer] count
- # @return [OpaqueValue]
+ # @param [FFI::Pointer(*ValueRef)] vals
+ # @param [Integer] count
+ # @return [OpaqueValue]
# @scope class
attach_function :md_node, :LLVMMDNode, [:pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method get_md_string(v, len)
- # @param [OpaqueValue] v
- # @param [FFI::Pointer(*UInt)] len
- # @return [String]
+ # @param [OpaqueValue] v
+ # @param [FFI::Pointer(*UInt)] len
+ # @return [String]
# @scope class
attach_function :get_md_string, :LLVMGetMDString, [OpaqueValue, :pointer], :string
-
# (Not documented)
- #
+
# @method get_md_node_num_operands(v)
- # @param [OpaqueValue] v
- # @return [Integer]
+ # @param [OpaqueValue] v
+ # @return [Integer]
# @scope class
attach_function :get_md_node_num_operands, :LLVMGetMDNodeNumOperands, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method get_md_node_operand(v, i)
- # @param [OpaqueValue] v
- # @param [Integer] i
- # @return [FFI::Pointer(*ValueRef)]
+ # @param [OpaqueValue] v
+ # @param [Integer] i
+ # @return [FFI::Pointer(*ValueRef)]
# @scope class
attach_function :get_md_node_operand, :LLVMGetMDNodeOperand, [OpaqueValue, :uint], :pointer
-
# (Not documented)
- #
+
# @method get_named_metadata_num_operands(m, name)
- # @param [OpaqueModule] m
- # @param [String] name
- # @return [Integer]
+ # @param [OpaqueModule] m
+ # @param [String] name
+ # @return [Integer]
# @scope class
attach_function :get_named_metadata_num_operands, :LLVMGetNamedMetadataNumOperands, [OpaqueModule, :string], :uint
-
# (Not documented)
- #
+
# @method get_named_metadata_operands(m, name, dest)
- # @param [OpaqueModule] m
- # @param [String] name
- # @param [FFI::Pointer(*ValueRef)] dest
- # @return [nil]
+ # @param [OpaqueModule] m
+ # @param [String] name
+ # @param [FFI::Pointer(*ValueRef)] dest
+ # @return [nil]
# @scope class
attach_function :get_named_metadata_operands, :LLVMGetNamedMetadataOperands, [OpaqueModule, :string, :pointer], :void
-
# Operations on scalar constants
- #
+
# @method const_int(int_ty, n, sign_extend)
- # @param [OpaqueType] int_ty
- # @param [Integer] n
- # @param [Integer] sign_extend
- # @return [OpaqueValue]
+ # @param [OpaqueType] int_ty
+ # @param [Integer] n
+ # @param [Integer] sign_extend
+ # @return [OpaqueValue]
# @scope class
attach_function :const_int, :LLVMConstInt, [OpaqueType, :ulong_long, :int], OpaqueValue
-
# (Not documented)
- #
+
# @method const_int_of_arbitrary_precision(int_ty, num_words, words)
- # @param [OpaqueType] int_ty
- # @param [Integer] num_words
- # @param [Array] words
- # @return [OpaqueValue]
+ # @param [OpaqueType] int_ty
+ # @param [Integer] num_words
+ # @param [FFI::Pointer(*U_long_long)] words
+ # @return [OpaqueValue]
# @scope class
attach_function :const_int_of_arbitrary_precision, :LLVMConstIntOfArbitraryPrecision, [OpaqueType, :uint, :pointer], OpaqueValue
-
# (Not documented)
- #
+
# @method const_int_of_string(int_ty, text, radix)
- # @param [OpaqueType] int_ty
- # @param [String] text
- # @param [Integer] radix
- # @return [OpaqueValue]
+ # @param [OpaqueType] int_ty
+ # @param [String] text
+ # @param [Integer] radix
+ # @return [OpaqueValue]
# @scope class
attach_function :const_int_of_string, :LLVMConstIntOfString, [OpaqueType, :string, :uchar], OpaqueValue
-
# (Not documented)
- #
+
# @method const_int_of_string_and_size(int_ty, text, s_len, radix)
- # @param [OpaqueType] int_ty
- # @param [String] text
- # @param [Integer] s_len
- # @param [Integer] radix
- # @return [OpaqueValue]
+ # @param [OpaqueType] int_ty
+ # @param [String] text
+ # @param [Integer] s_len
+ # @param [Integer] radix
+ # @return [OpaqueValue]
# @scope class
attach_function :const_int_of_string_and_size, :LLVMConstIntOfStringAndSize, [OpaqueType, :string, :uint, :uchar], OpaqueValue
-
# (Not documented)
- #
+
# @method const_real(real_ty, n)
- # @param [OpaqueType] real_ty
- # @param [Float] n
- # @return [OpaqueValue]
+ # @param [OpaqueType] real_ty
+ # @param [Float] n
+ # @return [OpaqueValue]
# @scope class
attach_function :const_real, :LLVMConstReal, [OpaqueType, :double], OpaqueValue
-
# (Not documented)
- #
+
# @method const_real_of_string(real_ty, text)
- # @param [OpaqueType] real_ty
- # @param [String] text
- # @return [OpaqueValue]
+ # @param [OpaqueType] real_ty
+ # @param [String] text
+ # @return [OpaqueValue]
# @scope class
attach_function :const_real_of_string, :LLVMConstRealOfString, [OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method const_real_of_string_and_size(real_ty, text, s_len)
- # @param [OpaqueType] real_ty
- # @param [String] text
- # @param [Integer] s_len
- # @return [OpaqueValue]
+ # @param [OpaqueType] real_ty
+ # @param [String] text
+ # @param [Integer] s_len
+ # @return [OpaqueValue]
# @scope class
attach_function :const_real_of_string_and_size, :LLVMConstRealOfStringAndSize, [OpaqueType, :string, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method const_int_get_z_ext_value(constant_val)
- # @param [OpaqueValue] constant_val
- # @return [Integer]
+ # @param [OpaqueValue] constant_val
+ # @return [Integer]
# @scope class
attach_function :const_int_get_z_ext_value, :LLVMConstIntGetZExtValue, [OpaqueValue], :ulong_long
-
# (Not documented)
- #
+
# @method const_int_get_s_ext_value(constant_val)
- # @param [OpaqueValue] constant_val
- # @return [Integer]
+ # @param [OpaqueValue] constant_val
+ # @return [Integer]
# @scope class
attach_function :const_int_get_s_ext_value, :LLVMConstIntGetSExtValue, [OpaqueValue], :long_long
-
# Operations on composite constants
- #
+
# @method const_string_in_context(c, str, length, dont_null_terminate)
- # @param [OpaqueContext] c
- # @param [String] str
- # @param [Integer] length
- # @param [Integer] dont_null_terminate
- # @return [OpaqueValue]
+ # @param [OpaqueContext] c
+ # @param [String] str
+ # @param [Integer] length
+ # @param [Integer] dont_null_terminate
+ # @return [OpaqueValue]
# @scope class
attach_function :const_string_in_context, :LLVMConstStringInContext, [OpaqueContext, :string, :uint, :int], OpaqueValue
-
# (Not documented)
- #
+
# @method const_struct_in_context(c, constant_vals, count, packed)
- # @param [OpaqueContext] c
- # @param [FFI::Pointer(*ValueRef)] constant_vals
- # @param [Integer] count
- # @param [Integer] packed
- # @return [OpaqueValue]
+ # @param [OpaqueContext] c
+ # @param [FFI::Pointer(*ValueRef)] constant_vals
+ # @param [Integer] count
+ # @param [Integer] packed
+ # @return [OpaqueValue]
# @scope class
attach_function :const_struct_in_context, :LLVMConstStructInContext, [OpaqueContext, :pointer, :uint, :int], OpaqueValue
-
# (Not documented)
- #
+
# @method const_string(str, length, dont_null_terminate)
- # @param [String] str
- # @param [Integer] length
- # @param [Integer] dont_null_terminate
- # @return [OpaqueValue]
+ # @param [String] str
+ # @param [Integer] length
+ # @param [Integer] dont_null_terminate
+ # @return [OpaqueValue]
# @scope class
attach_function :const_string, :LLVMConstString, [:string, :uint, :int], OpaqueValue
-
# (Not documented)
- #
+
# @method const_array(element_ty, constant_vals, length)
- # @param [OpaqueType] element_ty
- # @param [FFI::Pointer(*ValueRef)] constant_vals
- # @param [Integer] length
- # @return [OpaqueValue]
+ # @param [OpaqueType] element_ty
+ # @param [FFI::Pointer(*ValueRef)] constant_vals
+ # @param [Integer] length
+ # @return [OpaqueValue]
# @scope class
attach_function :const_array, :LLVMConstArray, [OpaqueType, :pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method const_struct(constant_vals, count, packed)
- # @param [FFI::Pointer(*ValueRef)] constant_vals
- # @param [Integer] count
- # @param [Integer] packed
- # @return [OpaqueValue]
+ # @param [FFI::Pointer(*ValueRef)] constant_vals
+ # @param [Integer] count
+ # @param [Integer] packed
+ # @return [OpaqueValue]
# @scope class
attach_function :const_struct, :LLVMConstStruct, [:pointer, :uint, :int], OpaqueValue
-
# (Not documented)
- #
+
# @method const_named_struct(struct_ty, constant_vals, count)
- # @param [OpaqueType] struct_ty
- # @param [FFI::Pointer(*ValueRef)] constant_vals
- # @param [Integer] count
- # @return [OpaqueValue]
+ # @param [OpaqueType] struct_ty
+ # @param [FFI::Pointer(*ValueRef)] constant_vals
+ # @param [Integer] count
+ # @return [OpaqueValue]
# @scope class
attach_function :const_named_struct, :LLVMConstNamedStruct, [OpaqueType, :pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method const_vector(scalar_constant_vals, size)
- # @param [FFI::Pointer(*ValueRef)] scalar_constant_vals
- # @param [Integer] size
- # @return [OpaqueValue]
+ # @param [FFI::Pointer(*ValueRef)] scalar_constant_vals
+ # @param [Integer] size
+ # @return [OpaqueValue]
# @scope class
attach_function :const_vector, :LLVMConstVector, [:pointer, :uint], OpaqueValue
-
# Constant expressions
- #
+
# @method get_const_opcode(constant_val)
- # @param [OpaqueValue] constant_val
- # @return [Symbol from _enum_opcode_]
+ # @param [OpaqueValue] constant_val
+ # @return [Symbol from _enum_opcode_]
# @scope class
attach_function :get_const_opcode, :LLVMGetConstOpcode, [OpaqueValue], :opcode
-
# (Not documented)
- #
+
# @method align_of(ty)
- # @param [OpaqueType] ty
- # @return [OpaqueValue]
+ # @param [OpaqueType] ty
+ # @return [OpaqueValue]
# @scope class
attach_function :align_of, :LLVMAlignOf, [OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method size_of(ty)
- # @param [OpaqueType] ty
- # @return [OpaqueValue]
+ # @param [OpaqueType] ty
+ # @return [OpaqueValue]
# @scope class
attach_function :size_of, :LLVMSizeOf, [OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_neg(constant_val)
- # @param [OpaqueValue] constant_val
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @return [OpaqueValue]
# @scope class
attach_function :const_neg, :LLVMConstNeg, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_nsw_neg(constant_val)
- # @param [OpaqueValue] constant_val
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @return [OpaqueValue]
# @scope class
attach_function :const_nsw_neg, :LLVMConstNSWNeg, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_nuw_neg(constant_val)
- # @param [OpaqueValue] constant_val
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @return [OpaqueValue]
# @scope class
attach_function :const_nuw_neg, :LLVMConstNUWNeg, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_f_neg(constant_val)
- # @param [OpaqueValue] constant_val
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @return [OpaqueValue]
# @scope class
attach_function :const_f_neg, :LLVMConstFNeg, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_not(constant_val)
- # @param [OpaqueValue] constant_val
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @return [OpaqueValue]
# @scope class
attach_function :const_not, :LLVMConstNot, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_add(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_add, :LLVMConstAdd, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_nsw_add(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_nsw_add, :LLVMConstNSWAdd, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_nuw_add(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_nuw_add, :LLVMConstNUWAdd, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_f_add(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_f_add, :LLVMConstFAdd, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_sub(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_sub, :LLVMConstSub, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_nsw_sub(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_nsw_sub, :LLVMConstNSWSub, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_nuw_sub(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_nuw_sub, :LLVMConstNUWSub, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_f_sub(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_f_sub, :LLVMConstFSub, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_mul(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_mul, :LLVMConstMul, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_nsw_mul(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_nsw_mul, :LLVMConstNSWMul, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_nuw_mul(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_nuw_mul, :LLVMConstNUWMul, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_f_mul(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_f_mul, :LLVMConstFMul, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_u_div(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_u_div, :LLVMConstUDiv, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_s_div(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_s_div, :LLVMConstSDiv, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_exact_s_div(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_exact_s_div, :LLVMConstExactSDiv, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_f_div(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_f_div, :LLVMConstFDiv, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_u_rem(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_u_rem, :LLVMConstURem, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_s_rem(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_s_rem, :LLVMConstSRem, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_f_rem(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_f_rem, :LLVMConstFRem, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_and(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_and, :LLVMConstAnd, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_or(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_or, :LLVMConstOr, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_xor(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_xor, :LLVMConstXor, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_i_cmp(predicate, lhs_constant, rhs_constant)
- # @param [Symbol from _enum_int_predicate_] predicate
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [Symbol from _enum_int_predicate_] predicate
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_i_cmp, :LLVMConstICmp, [:int_predicate, OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_f_cmp(predicate, lhs_constant, rhs_constant)
- # @param [Symbol from _enum_real_predicate_] predicate
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [Symbol from _enum_real_predicate_] predicate
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_f_cmp, :LLVMConstFCmp, [:real_predicate, OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_shl(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_shl, :LLVMConstShl, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_l_shr(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_l_shr, :LLVMConstLShr, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_a_shr(lhs_constant, rhs_constant)
- # @param [OpaqueValue] lhs_constant
- # @param [OpaqueValue] rhs_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] lhs_constant
+ # @param [OpaqueValue] rhs_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_a_shr, :LLVMConstAShr, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_gep(constant_val, constant_indices, num_indices)
- # @param [OpaqueValue] constant_val
- # @param [FFI::Pointer(*ValueRef)] constant_indices
- # @param [Integer] num_indices
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [FFI::Pointer(*ValueRef)] constant_indices
+ # @param [Integer] num_indices
+ # @return [OpaqueValue]
# @scope class
attach_function :const_gep, :LLVMConstGEP, [OpaqueValue, :pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method const_in_bounds_gep(constant_val, constant_indices, num_indices)
- # @param [OpaqueValue] constant_val
- # @param [FFI::Pointer(*ValueRef)] constant_indices
- # @param [Integer] num_indices
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [FFI::Pointer(*ValueRef)] constant_indices
+ # @param [Integer] num_indices
+ # @return [OpaqueValue]
# @scope class
attach_function :const_in_bounds_gep, :LLVMConstInBoundsGEP, [OpaqueValue, :pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method const_trunc(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_trunc, :LLVMConstTrunc, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_s_ext(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_s_ext, :LLVMConstSExt, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_z_ext(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_z_ext, :LLVMConstZExt, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_fp_trunc(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_fp_trunc, :LLVMConstFPTrunc, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_fp_ext(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_fp_ext, :LLVMConstFPExt, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_ui_to_fp(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_ui_to_fp, :LLVMConstUIToFP, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_si_to_fp(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_si_to_fp, :LLVMConstSIToFP, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_fp_to_ui(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_fp_to_ui, :LLVMConstFPToUI, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_fp_to_si(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_fp_to_si, :LLVMConstFPToSI, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_ptr_to_int(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_ptr_to_int, :LLVMConstPtrToInt, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_int_to_ptr(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_int_to_ptr, :LLVMConstIntToPtr, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_bit_cast(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_bit_cast, :LLVMConstBitCast, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_z_ext_or_bit_cast(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_z_ext_or_bit_cast, :LLVMConstZExtOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_s_ext_or_bit_cast(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_s_ext_or_bit_cast, :LLVMConstSExtOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_trunc_or_bit_cast(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_trunc_or_bit_cast, :LLVMConstTruncOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_pointer_cast(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_pointer_cast, :LLVMConstPointerCast, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_int_cast(constant_val, to_type, is_signed)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @param [Integer] is_signed
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @param [Integer] is_signed
+ # @return [OpaqueValue]
# @scope class
attach_function :const_int_cast, :LLVMConstIntCast, [OpaqueValue, OpaqueType, :int], OpaqueValue
-
# (Not documented)
- #
+
# @method const_fp_cast(constant_val, to_type)
- # @param [OpaqueValue] constant_val
- # @param [OpaqueType] to_type
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_val
+ # @param [OpaqueType] to_type
+ # @return [OpaqueValue]
# @scope class
attach_function :const_fp_cast, :LLVMConstFPCast, [OpaqueValue, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method const_select(constant_condition, constant_if_true, constant_if_false)
- # @param [OpaqueValue] constant_condition
- # @param [OpaqueValue] constant_if_true
- # @param [OpaqueValue] constant_if_false
- # @return [OpaqueValue]
+ # @param [OpaqueValue] constant_condition
+ # @param [OpaqueValue] constant_if_true
+ # @param [OpaqueValue] constant_if_false
+ # @return [OpaqueValue]
# @scope class
attach_function :const_select, :LLVMConstSelect, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_extract_element(vector_constant, index_constant)
- # @param [OpaqueValue] vector_constant
- # @param [OpaqueValue] index_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] vector_constant
+ # @param [OpaqueValue] index_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_extract_element, :LLVMConstExtractElement, [OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_insert_element(vector_constant, element_value_constant, index_constant)
- # @param [OpaqueValue] vector_constant
- # @param [OpaqueValue] element_value_constant
- # @param [OpaqueValue] index_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] vector_constant
+ # @param [OpaqueValue] element_value_constant
+ # @param [OpaqueValue] index_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_insert_element, :LLVMConstInsertElement, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_shuffle_vector(vector_a_constant, vector_b_constant, mask_constant)
- # @param [OpaqueValue] vector_a_constant
- # @param [OpaqueValue] vector_b_constant
- # @param [OpaqueValue] mask_constant
- # @return [OpaqueValue]
+ # @param [OpaqueValue] vector_a_constant
+ # @param [OpaqueValue] vector_b_constant
+ # @param [OpaqueValue] mask_constant
+ # @return [OpaqueValue]
# @scope class
attach_function :const_shuffle_vector, :LLVMConstShuffleVector, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method const_extract_value(agg_constant, idx_list, num_idx)
- # @param [OpaqueValue] agg_constant
- # @param [FFI::Pointer(*UInt)] idx_list
- # @param [Integer] num_idx
- # @return [OpaqueValue]
+ # @param [OpaqueValue] agg_constant
+ # @param [FFI::Pointer(*UInt)] idx_list
+ # @param [Integer] num_idx
+ # @return [OpaqueValue]
# @scope class
attach_function :const_extract_value, :LLVMConstExtractValue, [OpaqueValue, :pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method const_insert_value(agg_constant, element_value_constant, idx_list, num_idx)
- # @param [OpaqueValue] agg_constant
- # @param [OpaqueValue] element_value_constant
- # @param [FFI::Pointer(*UInt)] idx_list
- # @param [Integer] num_idx
- # @return [OpaqueValue]
+ # @param [OpaqueValue] agg_constant
+ # @param [OpaqueValue] element_value_constant
+ # @param [FFI::Pointer(*UInt)] idx_list
+ # @param [Integer] num_idx
+ # @return [OpaqueValue]
# @scope class
attach_function :const_insert_value, :LLVMConstInsertValue, [OpaqueValue, OpaqueValue, :pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method const_inline_asm(ty, asm_string, constraints, has_side_effects, is_align_stack)
- # @param [OpaqueType] ty
- # @param [String] asm_string
- # @param [String] constraints
- # @param [Integer] has_side_effects
- # @param [Integer] is_align_stack
- # @return [OpaqueValue]
+ # @param [OpaqueType] ty
+ # @param [String] asm_string
+ # @param [String] constraints
+ # @param [Integer] has_side_effects
+ # @param [Integer] is_align_stack
+ # @return [OpaqueValue]
# @scope class
attach_function :const_inline_asm, :LLVMConstInlineAsm, [OpaqueType, :string, :string, :int, :int], OpaqueValue
-
# (Not documented)
- #
+
# @method block_address(f, bb)
- # @param [OpaqueValue] f
- # @param [OpaqueBasicBlock] bb
- # @return [OpaqueValue]
+ # @param [OpaqueValue] f
+ # @param [OpaqueBasicBlock] bb
+ # @return [OpaqueValue]
# @scope class
attach_function :block_address, :LLVMBlockAddress, [OpaqueValue, OpaqueBasicBlock], OpaqueValue
-
# Operations on global variables, functions, and aliases (globals)
- #
+
# @method get_global_parent(global)
- # @param [OpaqueValue] global
- # @return [OpaqueModule]
+ # @param [OpaqueValue] global
+ # @return [OpaqueModule]
# @scope class
attach_function :get_global_parent, :LLVMGetGlobalParent, [OpaqueValue], OpaqueModule
-
# (Not documented)
- #
+
# @method is_declaration(global)
- # @param [OpaqueValue] global
- # @return [Integer]
+ # @param [OpaqueValue] global
+ # @return [Integer]
# @scope class
attach_function :is_declaration, :LLVMIsDeclaration, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method get_linkage(global)
- # @param [OpaqueValue] global
- # @return [Symbol from _enum_linkage_]
+ # @param [OpaqueValue] global
+ # @return [Symbol from _enum_linkage_]
# @scope class
attach_function :get_linkage, :LLVMGetLinkage, [OpaqueValue], :linkage
-
# (Not documented)
- #
+
# @method set_linkage(global, linkage)
- # @param [OpaqueValue] global
- # @param [Symbol from _enum_linkage_] linkage
- # @return [nil]
+ # @param [OpaqueValue] global
+ # @param [Symbol from _enum_linkage_] linkage
+ # @return [nil]
# @scope class
attach_function :set_linkage, :LLVMSetLinkage, [OpaqueValue, :linkage], :void
-
# (Not documented)
- #
+
# @method get_section(global)
- # @param [OpaqueValue] global
- # @return [String]
+ # @param [OpaqueValue] global
+ # @return [String]
# @scope class
attach_function :get_section, :LLVMGetSection, [OpaqueValue], :string
-
# (Not documented)
- #
+
# @method set_section(global, section)
- # @param [OpaqueValue] global
- # @param [String] section
- # @return [nil]
+ # @param [OpaqueValue] global
+ # @param [String] section
+ # @return [nil]
# @scope class
attach_function :set_section, :LLVMSetSection, [OpaqueValue, :string], :void
-
# (Not documented)
- #
+
# @method get_visibility(global)
- # @param [OpaqueValue] global
- # @return [Symbol from _enum_visibility_]
+ # @param [OpaqueValue] global
+ # @return [Symbol from _enum_visibility_]
# @scope class
attach_function :get_visibility, :LLVMGetVisibility, [OpaqueValue], :visibility
-
# (Not documented)
- #
+
# @method set_visibility(global, viz)
- # @param [OpaqueValue] global
- # @param [Symbol from _enum_visibility_] viz
- # @return [nil]
+ # @param [OpaqueValue] global
+ # @param [Symbol from _enum_visibility_] viz
+ # @return [nil]
# @scope class
attach_function :set_visibility, :LLVMSetVisibility, [OpaqueValue, :visibility], :void
-
# (Not documented)
- #
+
# @method get_alignment(global)
- # @param [OpaqueValue] global
- # @return [Integer]
+ # @param [OpaqueValue] global
+ # @return [Integer]
# @scope class
attach_function :get_alignment, :LLVMGetAlignment, [OpaqueValue], :uint
-
# (Not documented)
- #
+
# @method set_alignment(global, bytes)
- # @param [OpaqueValue] global
- # @param [Integer] bytes
- # @return [nil]
+ # @param [OpaqueValue] global
+ # @param [Integer] bytes
+ # @return [nil]
# @scope class
attach_function :set_alignment, :LLVMSetAlignment, [OpaqueValue, :uint], :void
-
# Operations on global variables
- #
+
# @method add_global(m, ty, name)
- # @param [OpaqueModule] m
- # @param [OpaqueType] ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @param [OpaqueType] ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :add_global, :LLVMAddGlobal, [OpaqueModule, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method add_global_in_address_space(m, ty, name, address_space)
- # @param [OpaqueModule] m
- # @param [OpaqueType] ty
- # @param [String] name
- # @param [Integer] address_space
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @param [OpaqueType] ty
+ # @param [String] name
+ # @param [Integer] address_space
+ # @return [OpaqueValue]
# @scope class
attach_function :add_global_in_address_space, :LLVMAddGlobalInAddressSpace, [OpaqueModule, OpaqueType, :string, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method get_named_global(m, name)
- # @param [OpaqueModule] m
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :get_named_global, :LLVMGetNamedGlobal, [OpaqueModule, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method get_first_global(m)
- # @param [OpaqueModule] m
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @return [OpaqueValue]
# @scope class
attach_function :get_first_global, :LLVMGetFirstGlobal, [OpaqueModule], OpaqueValue
-
# (Not documented)
- #
+
# @method get_last_global(m)
- # @param [OpaqueModule] m
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @return [OpaqueValue]
# @scope class
attach_function :get_last_global, :LLVMGetLastGlobal, [OpaqueModule], OpaqueValue
-
# (Not documented)
- #
+
# @method get_next_global(global_var)
- # @param [OpaqueValue] global_var
- # @return [OpaqueValue]
+ # @param [OpaqueValue] global_var
+ # @return [OpaqueValue]
# @scope class
attach_function :get_next_global, :LLVMGetNextGlobal, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method get_previous_global(global_var)
- # @param [OpaqueValue] global_var
- # @return [OpaqueValue]
+ # @param [OpaqueValue] global_var
+ # @return [OpaqueValue]
# @scope class
attach_function :get_previous_global, :LLVMGetPreviousGlobal, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method delete_global(global_var)
- # @param [OpaqueValue] global_var
- # @return [nil]
+ # @param [OpaqueValue] global_var
+ # @return [nil]
# @scope class
attach_function :delete_global, :LLVMDeleteGlobal, [OpaqueValue], :void
-
# (Not documented)
- #
+
# @method get_initializer(global_var)
- # @param [OpaqueValue] global_var
- # @return [OpaqueValue]
+ # @param [OpaqueValue] global_var
+ # @return [OpaqueValue]
# @scope class
attach_function :get_initializer, :LLVMGetInitializer, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method set_initializer(global_var, constant_val)
- # @param [OpaqueValue] global_var
- # @param [OpaqueValue] constant_val
- # @return [nil]
+ # @param [OpaqueValue] global_var
+ # @param [OpaqueValue] constant_val
+ # @return [nil]
# @scope class
attach_function :set_initializer, :LLVMSetInitializer, [OpaqueValue, OpaqueValue], :void
-
# (Not documented)
- #
+
# @method is_thread_local(global_var)
- # @param [OpaqueValue] global_var
- # @return [Integer]
+ # @param [OpaqueValue] global_var
+ # @return [Integer]
# @scope class
attach_function :is_thread_local, :LLVMIsThreadLocal, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method set_thread_local(global_var, is_thread_local)
- # @param [OpaqueValue] global_var
- # @param [Integer] is_thread_local
- # @return [nil]
+ # @param [OpaqueValue] global_var
+ # @param [Integer] is_thread_local
+ # @return [nil]
# @scope class
attach_function :set_thread_local, :LLVMSetThreadLocal, [OpaqueValue, :int], :void
-
# (Not documented)
- #
+
# @method is_global_constant(global_var)
- # @param [OpaqueValue] global_var
- # @return [Integer]
+ # @param [OpaqueValue] global_var
+ # @return [Integer]
# @scope class
attach_function :is_global_constant, :LLVMIsGlobalConstant, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method set_global_constant(global_var, is_constant)
- # @param [OpaqueValue] global_var
- # @param [Integer] is_constant
- # @return [nil]
+ # @param [OpaqueValue] global_var
+ # @param [Integer] is_constant
+ # @return [nil]
# @scope class
attach_function :set_global_constant, :LLVMSetGlobalConstant, [OpaqueValue, :int], :void
-
# Operations on aliases
- #
+
# @method add_alias(m, ty, aliasee, name)
- # @param [OpaqueModule] m
- # @param [OpaqueType] ty
- # @param [OpaqueValue] aliasee
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @param [OpaqueType] ty
+ # @param [OpaqueValue] aliasee
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :add_alias, :LLVMAddAlias, [OpaqueModule, OpaqueType, OpaqueValue, :string], OpaqueValue
-
# Operations on functions
- #
+
# @method add_function(m, name, function_ty)
- # @param [OpaqueModule] m
- # @param [String] name
- # @param [OpaqueType] function_ty
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @param [String] name
+ # @param [OpaqueType] function_ty
+ # @return [OpaqueValue]
# @scope class
attach_function :add_function, :LLVMAddFunction, [OpaqueModule, :string, OpaqueType], OpaqueValue
-
# (Not documented)
- #
+
# @method get_named_function(m, name)
- # @param [OpaqueModule] m
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :get_named_function, :LLVMGetNamedFunction, [OpaqueModule, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method get_first_function(m)
- # @param [OpaqueModule] m
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @return [OpaqueValue]
# @scope class
attach_function :get_first_function, :LLVMGetFirstFunction, [OpaqueModule], OpaqueValue
-
# (Not documented)
- #
+
# @method get_last_function(m)
- # @param [OpaqueModule] m
- # @return [OpaqueValue]
+ # @param [OpaqueModule] m
+ # @return [OpaqueValue]
# @scope class
attach_function :get_last_function, :LLVMGetLastFunction, [OpaqueModule], OpaqueValue
-
# (Not documented)
- #
+
# @method get_next_function(fn)
- # @param [OpaqueValue] fn
- # @return [OpaqueValue]
+ # @param [OpaqueValue] fn
+ # @return [OpaqueValue]
# @scope class
attach_function :get_next_function, :LLVMGetNextFunction, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method get_previous_function(fn)
- # @param [OpaqueValue] fn
- # @return [OpaqueValue]
+ # @param [OpaqueValue] fn
+ # @return [OpaqueValue]
# @scope class
attach_function :get_previous_function, :LLVMGetPreviousFunction, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method delete_function(fn)
- # @param [OpaqueValue] fn
- # @return [nil]
+ # @param [OpaqueValue] fn
+ # @return [nil]
# @scope class
attach_function :delete_function, :LLVMDeleteFunction, [OpaqueValue], :void
-
# (Not documented)
- #
+
# @method get_intrinsic_id(fn)
- # @param [OpaqueValue] fn
- # @return [Integer]
+ # @param [OpaqueValue] fn
+ # @return [Integer]
# @scope class
attach_function :get_intrinsic_id, :LLVMGetIntrinsicID, [OpaqueValue], :uint
-
# (Not documented)
- #
+
# @method get_function_call_conv(fn)
- # @param [OpaqueValue] fn
- # @return [Integer]
+ # @param [OpaqueValue] fn
+ # @return [Integer]
# @scope class
attach_function :get_function_call_conv, :LLVMGetFunctionCallConv, [OpaqueValue], :uint
-
# (Not documented)
- #
+
# @method set_function_call_conv(fn, cc)
- # @param [OpaqueValue] fn
- # @param [Integer] cc
- # @return [nil]
+ # @param [OpaqueValue] fn
+ # @param [Integer] cc
+ # @return [nil]
# @scope class
attach_function :set_function_call_conv, :LLVMSetFunctionCallConv, [OpaqueValue, :uint], :void
-
# (Not documented)
- #
+
# @method get_gc(fn)
- # @param [OpaqueValue] fn
- # @return [String]
+ # @param [OpaqueValue] fn
+ # @return [String]
# @scope class
attach_function :get_gc, :LLVMGetGC, [OpaqueValue], :string
-
# (Not documented)
- #
+
# @method set_gc(fn, name)
- # @param [OpaqueValue] fn
- # @param [String] name
- # @return [nil]
+ # @param [OpaqueValue] fn
+ # @param [String] name
+ # @return [nil]
# @scope class
attach_function :set_gc, :LLVMSetGC, [OpaqueValue, :string], :void
-
# (Not documented)
- #
+
# @method add_function_attr(fn, pa)
- # @param [OpaqueValue] fn
- # @param [Symbol from _enum_attribute_] pa
- # @return [nil]
+ # @param [OpaqueValue] fn
+ # @param [Symbol from _enum_attribute_] pa
+ # @return [nil]
# @scope class
attach_function :add_function_attr, :LLVMAddFunctionAttr, [OpaqueValue, :attribute], :void
-
# (Not documented)
- #
+
# @method get_function_attr(fn)
- # @param [OpaqueValue] fn
- # @return [Symbol from _enum_attribute_]
+ # @param [OpaqueValue] fn
+ # @return [Symbol from _enum_attribute_]
# @scope class
attach_function :get_function_attr, :LLVMGetFunctionAttr, [OpaqueValue], :attribute
-
# (Not documented)
- #
+
# @method remove_function_attr(fn, pa)
- # @param [OpaqueValue] fn
- # @param [Symbol from _enum_attribute_] pa
- # @return [nil]
+ # @param [OpaqueValue] fn
+ # @param [Symbol from _enum_attribute_] pa
+ # @return [nil]
# @scope class
attach_function :remove_function_attr, :LLVMRemoveFunctionAttr, [OpaqueValue, :attribute], :void
-
# Operations on parameters
- #
+
# @method count_params(fn)
- # @param [OpaqueValue] fn
- # @return [Integer]
+ # @param [OpaqueValue] fn
+ # @return [Integer]
# @scope class
attach_function :count_params, :LLVMCountParams, [OpaqueValue], :uint
-
# (Not documented)
- #
+
# @method get_params(fn, params)
- # @param [OpaqueValue] fn
- # @param [FFI::Pointer(*ValueRef)] params
- # @return [nil]
+ # @param [OpaqueValue] fn
+ # @param [FFI::Pointer(*ValueRef)] params
+ # @return [nil]
# @scope class
attach_function :get_params, :LLVMGetParams, [OpaqueValue, :pointer], :void
-
# (Not documented)
- #
+
# @method get_param(fn, index)
- # @param [OpaqueValue] fn
- # @param [Integer] index
- # @return [OpaqueValue]
+ # @param [OpaqueValue] fn
+ # @param [Integer] index
+ # @return [OpaqueValue]
# @scope class
attach_function :get_param, :LLVMGetParam, [OpaqueValue, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method get_param_parent(inst)
- # @param [OpaqueValue] inst
- # @return [OpaqueValue]
+ # @param [OpaqueValue] inst
+ # @return [OpaqueValue]
# @scope class
attach_function :get_param_parent, :LLVMGetParamParent, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method get_first_param(fn)
- # @param [OpaqueValue] fn
- # @return [OpaqueValue]
+ # @param [OpaqueValue] fn
+ # @return [OpaqueValue]
# @scope class
attach_function :get_first_param, :LLVMGetFirstParam, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method get_last_param(fn)
- # @param [OpaqueValue] fn
- # @return [OpaqueValue]
+ # @param [OpaqueValue] fn
+ # @return [OpaqueValue]
# @scope class
attach_function :get_last_param, :LLVMGetLastParam, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method get_next_param(arg)
- # @param [OpaqueValue] arg
- # @return [OpaqueValue]
+ # @param [OpaqueValue] arg
+ # @return [OpaqueValue]
# @scope class
attach_function :get_next_param, :LLVMGetNextParam, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method get_previous_param(arg)
- # @param [OpaqueValue] arg
- # @return [OpaqueValue]
+ # @param [OpaqueValue] arg
+ # @return [OpaqueValue]
# @scope class
attach_function :get_previous_param, :LLVMGetPreviousParam, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method add_attribute(arg, pa)
- # @param [OpaqueValue] arg
- # @param [Symbol from _enum_attribute_] pa
- # @return [nil]
+ # @param [OpaqueValue] arg
+ # @param [Symbol from _enum_attribute_] pa
+ # @return [nil]
# @scope class
attach_function :add_attribute, :LLVMAddAttribute, [OpaqueValue, :attribute], :void
-
# (Not documented)
- #
+
# @method remove_attribute(arg, pa)
- # @param [OpaqueValue] arg
- # @param [Symbol from _enum_attribute_] pa
- # @return [nil]
+ # @param [OpaqueValue] arg
+ # @param [Symbol from _enum_attribute_] pa
+ # @return [nil]
# @scope class
attach_function :remove_attribute, :LLVMRemoveAttribute, [OpaqueValue, :attribute], :void
-
# (Not documented)
- #
+
# @method get_attribute(arg)
- # @param [OpaqueValue] arg
- # @return [Symbol from _enum_attribute_]
+ # @param [OpaqueValue] arg
+ # @return [Symbol from _enum_attribute_]
# @scope class
attach_function :get_attribute, :LLVMGetAttribute, [OpaqueValue], :attribute
-
# (Not documented)
- #
+
# @method set_param_alignment(arg, align)
- # @param [OpaqueValue] arg
- # @param [Integer] align
- # @return [nil]
+ # @param [OpaqueValue] arg
+ # @param [Integer] align
+ # @return [nil]
# @scope class
attach_function :set_param_alignment, :LLVMSetParamAlignment, [OpaqueValue, :uint], :void
-
# Operations on basic blocks
- #
+
# @method basic_block_as_value(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [OpaqueValue]
+ # @param [OpaqueBasicBlock] bb
+ # @return [OpaqueValue]
# @scope class
attach_function :basic_block_as_value, :LLVMBasicBlockAsValue, [OpaqueBasicBlock], OpaqueValue
-
# (Not documented)
- #
+
# @method value_is_basic_block(val)
- # @param [OpaqueValue] val
- # @return [Integer]
+ # @param [OpaqueValue] val
+ # @return [Integer]
# @scope class
attach_function :value_is_basic_block, :LLVMValueIsBasicBlock, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method value_as_basic_block(val)
- # @param [OpaqueValue] val
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueValue] val
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :value_as_basic_block, :LLVMValueAsBasicBlock, [OpaqueValue], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method get_basic_block_parent(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [OpaqueValue]
+ # @param [OpaqueBasicBlock] bb
+ # @return [OpaqueValue]
# @scope class
attach_function :get_basic_block_parent, :LLVMGetBasicBlockParent, [OpaqueBasicBlock], OpaqueValue
-
# (Not documented)
- #
+
# @method get_basic_block_terminator(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [OpaqueValue]
+ # @param [OpaqueBasicBlock] bb
+ # @return [OpaqueValue]
# @scope class
attach_function :get_basic_block_terminator, :LLVMGetBasicBlockTerminator, [OpaqueBasicBlock], OpaqueValue
-
# (Not documented)
- #
+
# @method count_basic_blocks(fn)
- # @param [OpaqueValue] fn
- # @return [Integer]
+ # @param [OpaqueValue] fn
+ # @return [Integer]
# @scope class
attach_function :count_basic_blocks, :LLVMCountBasicBlocks, [OpaqueValue], :uint
-
# (Not documented)
- #
+
# @method get_basic_blocks(fn, basic_blocks)
- # @param [OpaqueValue] fn
- # @param [FFI::Pointer(*BasicBlockRef)] basic_blocks
- # @return [nil]
+ # @param [OpaqueValue] fn
+ # @param [FFI::Pointer(*BasicBlockRef)] basic_blocks
+ # @return [nil]
# @scope class
attach_function :get_basic_blocks, :LLVMGetBasicBlocks, [OpaqueValue, :pointer], :void
-
# (Not documented)
- #
+
# @method get_first_basic_block(fn)
- # @param [OpaqueValue] fn
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueValue] fn
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_first_basic_block, :LLVMGetFirstBasicBlock, [OpaqueValue], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method get_last_basic_block(fn)
- # @param [OpaqueValue] fn
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueValue] fn
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_last_basic_block, :LLVMGetLastBasicBlock, [OpaqueValue], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method get_next_basic_block(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueBasicBlock] bb
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_next_basic_block, :LLVMGetNextBasicBlock, [OpaqueBasicBlock], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method get_previous_basic_block(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueBasicBlock] bb
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_previous_basic_block, :LLVMGetPreviousBasicBlock, [OpaqueBasicBlock], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method get_entry_basic_block(fn)
- # @param [OpaqueValue] fn
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueValue] fn
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_entry_basic_block, :LLVMGetEntryBasicBlock, [OpaqueValue], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method append_basic_block_in_context(c, fn, name)
- # @param [OpaqueContext] c
- # @param [OpaqueValue] fn
- # @param [String] name
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueContext] c
+ # @param [OpaqueValue] fn
+ # @param [String] name
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :append_basic_block_in_context, :LLVMAppendBasicBlockInContext, [OpaqueContext, OpaqueValue, :string], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method insert_basic_block_in_context(c, bb, name)
- # @param [OpaqueContext] c
- # @param [OpaqueBasicBlock] bb
- # @param [String] name
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueContext] c
+ # @param [OpaqueBasicBlock] bb
+ # @param [String] name
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :insert_basic_block_in_context, :LLVMInsertBasicBlockInContext, [OpaqueContext, OpaqueBasicBlock, :string], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method append_basic_block(fn, name)
- # @param [OpaqueValue] fn
- # @param [String] name
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueValue] fn
+ # @param [String] name
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :append_basic_block, :LLVMAppendBasicBlock, [OpaqueValue, :string], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method insert_basic_block(insert_before_bb, name)
- # @param [OpaqueBasicBlock] insert_before_bb
- # @param [String] name
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueBasicBlock] insert_before_bb
+ # @param [String] name
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :insert_basic_block, :LLVMInsertBasicBlock, [OpaqueBasicBlock, :string], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method delete_basic_block(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [nil]
+ # @param [OpaqueBasicBlock] bb
+ # @return [nil]
# @scope class
attach_function :delete_basic_block, :LLVMDeleteBasicBlock, [OpaqueBasicBlock], :void
-
# (Not documented)
- #
+
# @method remove_basic_block_from_parent(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [nil]
+ # @param [OpaqueBasicBlock] bb
+ # @return [nil]
# @scope class
attach_function :remove_basic_block_from_parent, :LLVMRemoveBasicBlockFromParent, [OpaqueBasicBlock], :void
-
# (Not documented)
- #
+
# @method move_basic_block_before(bb, move_pos)
- # @param [OpaqueBasicBlock] bb
- # @param [OpaqueBasicBlock] move_pos
- # @return [nil]
+ # @param [OpaqueBasicBlock] bb
+ # @param [OpaqueBasicBlock] move_pos
+ # @return [nil]
# @scope class
attach_function :move_basic_block_before, :LLVMMoveBasicBlockBefore, [OpaqueBasicBlock, OpaqueBasicBlock], :void
-
# (Not documented)
- #
+
# @method move_basic_block_after(bb, move_pos)
- # @param [OpaqueBasicBlock] bb
- # @param [OpaqueBasicBlock] move_pos
- # @return [nil]
+ # @param [OpaqueBasicBlock] bb
+ # @param [OpaqueBasicBlock] move_pos
+ # @return [nil]
# @scope class
attach_function :move_basic_block_after, :LLVMMoveBasicBlockAfter, [OpaqueBasicBlock, OpaqueBasicBlock], :void
-
# (Not documented)
- #
+
# @method get_first_instruction(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [OpaqueValue]
+ # @param [OpaqueBasicBlock] bb
+ # @return [OpaqueValue]
# @scope class
attach_function :get_first_instruction, :LLVMGetFirstInstruction, [OpaqueBasicBlock], OpaqueValue
-
# (Not documented)
- #
+
# @method get_last_instruction(bb)
- # @param [OpaqueBasicBlock] bb
- # @return [OpaqueValue]
+ # @param [OpaqueBasicBlock] bb
+ # @return [OpaqueValue]
# @scope class
attach_function :get_last_instruction, :LLVMGetLastInstruction, [OpaqueBasicBlock], OpaqueValue
-
# Operations on instructions
- #
+
# @method get_instruction_parent(inst)
- # @param [OpaqueValue] inst
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueValue] inst
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_instruction_parent, :LLVMGetInstructionParent, [OpaqueValue], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method get_next_instruction(inst)
- # @param [OpaqueValue] inst
- # @return [OpaqueValue]
+ # @param [OpaqueValue] inst
+ # @return [OpaqueValue]
# @scope class
attach_function :get_next_instruction, :LLVMGetNextInstruction, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method get_previous_instruction(inst)
- # @param [OpaqueValue] inst
- # @return [OpaqueValue]
+ # @param [OpaqueValue] inst
+ # @return [OpaqueValue]
# @scope class
attach_function :get_previous_instruction, :LLVMGetPreviousInstruction, [OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method instruction_erase_from_parent(inst)
- # @param [OpaqueValue] inst
- # @return [nil]
+ # @param [OpaqueValue] inst
+ # @return [nil]
# @scope class
attach_function :instruction_erase_from_parent, :LLVMInstructionEraseFromParent, [OpaqueValue], :void
-
# (Not documented)
- #
+
# @method get_instruction_opcode(inst)
- # @param [OpaqueValue] inst
- # @return [Symbol from _enum_opcode_]
+ # @param [OpaqueValue] inst
+ # @return [Symbol from _enum_opcode_]
# @scope class
attach_function :get_instruction_opcode, :LLVMGetInstructionOpcode, [OpaqueValue], :opcode
-
# (Not documented)
- #
+
# @method get_i_cmp_predicate(inst)
- # @param [OpaqueValue] inst
- # @return [Symbol from _enum_int_predicate_]
+ # @param [OpaqueValue] inst
+ # @return [Symbol from _enum_int_predicate_]
# @scope class
attach_function :get_i_cmp_predicate, :LLVMGetICmpPredicate, [OpaqueValue], :int_predicate
-
# Operations on call sites
- #
+
# @method set_instruction_call_conv(instr, cc)
- # @param [OpaqueValue] instr
- # @param [Integer] cc
- # @return [nil]
+ # @param [OpaqueValue] instr
+ # @param [Integer] cc
+ # @return [nil]
# @scope class
attach_function :set_instruction_call_conv, :LLVMSetInstructionCallConv, [OpaqueValue, :uint], :void
-
# (Not documented)
- #
+
# @method get_instruction_call_conv(instr)
- # @param [OpaqueValue] instr
- # @return [Integer]
+ # @param [OpaqueValue] instr
+ # @return [Integer]
# @scope class
attach_function :get_instruction_call_conv, :LLVMGetInstructionCallConv, [OpaqueValue], :uint
-
# (Not documented)
- #
+
# @method add_instr_attribute(instr, index, attribute)
- # @param [OpaqueValue] instr
- # @param [Integer] index
- # @param [Symbol from _enum_attribute_] attribute
- # @return [nil]
+ # @param [OpaqueValue] instr
+ # @param [Integer] index
+ # @param [Symbol from _enum_attribute_] attribute
+ # @return [nil]
# @scope class
attach_function :add_instr_attribute, :LLVMAddInstrAttribute, [OpaqueValue, :uint, :attribute], :void
-
# (Not documented)
- #
+
# @method remove_instr_attribute(instr, index, attribute)
- # @param [OpaqueValue] instr
- # @param [Integer] index
- # @param [Symbol from _enum_attribute_] attribute
- # @return [nil]
+ # @param [OpaqueValue] instr
+ # @param [Integer] index
+ # @param [Symbol from _enum_attribute_] attribute
+ # @return [nil]
# @scope class
attach_function :remove_instr_attribute, :LLVMRemoveInstrAttribute, [OpaqueValue, :uint, :attribute], :void
-
# (Not documented)
- #
+
# @method set_instr_param_alignment(instr, index, align)
- # @param [OpaqueValue] instr
- # @param [Integer] index
- # @param [Integer] align
- # @return [nil]
+ # @param [OpaqueValue] instr
+ # @param [Integer] index
+ # @param [Integer] align
+ # @return [nil]
# @scope class
attach_function :set_instr_param_alignment, :LLVMSetInstrParamAlignment, [OpaqueValue, :uint, :uint], :void
-
# Operations on call instructions (only)
- #
+
# @method is_tail_call(call_inst)
- # @param [OpaqueValue] call_inst
- # @return [Integer]
+ # @param [OpaqueValue] call_inst
+ # @return [Integer]
# @scope class
attach_function :is_tail_call, :LLVMIsTailCall, [OpaqueValue], :int
-
# (Not documented)
- #
+
# @method set_tail_call(call_inst, is_tail_call)
- # @param [OpaqueValue] call_inst
- # @param [Integer] is_tail_call
- # @return [nil]
+ # @param [OpaqueValue] call_inst
+ # @param [Integer] is_tail_call
+ # @return [nil]
# @scope class
attach_function :set_tail_call, :LLVMSetTailCall, [OpaqueValue, :int], :void
-
# Operations on switch instructions (only)
- #
+
# @method get_switch_default_dest(switch_instr)
- # @param [OpaqueValue] switch_instr
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueValue] switch_instr
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_switch_default_dest, :LLVMGetSwitchDefaultDest, [OpaqueValue], OpaqueBasicBlock
-
# Operations on phi nodes
- #
+
# @method add_incoming(phi_node, incoming_values, incoming_blocks, count)
- # @param [OpaqueValue] phi_node
- # @param [FFI::Pointer(*ValueRef)] incoming_values
- # @param [FFI::Pointer(*BasicBlockRef)] incoming_blocks
- # @param [Integer] count
- # @return [nil]
+ # @param [OpaqueValue] phi_node
+ # @param [FFI::Pointer(*ValueRef)] incoming_values
+ # @param [FFI::Pointer(*BasicBlockRef)] incoming_blocks
+ # @param [Integer] count
+ # @return [nil]
# @scope class
attach_function :add_incoming, :LLVMAddIncoming, [OpaqueValue, :pointer, :pointer, :uint], :void
-
# (Not documented)
- #
+
# @method count_incoming(phi_node)
- # @param [OpaqueValue] phi_node
- # @return [Integer]
+ # @param [OpaqueValue] phi_node
+ # @return [Integer]
# @scope class
attach_function :count_incoming, :LLVMCountIncoming, [OpaqueValue], :uint
-
# (Not documented)
- #
+
# @method get_incoming_value(phi_node, index)
- # @param [OpaqueValue] phi_node
- # @param [Integer] index
- # @return [OpaqueValue]
+ # @param [OpaqueValue] phi_node
+ # @param [Integer] index
+ # @return [OpaqueValue]
# @scope class
attach_function :get_incoming_value, :LLVMGetIncomingValue, [OpaqueValue, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method get_incoming_block(phi_node, index)
- # @param [OpaqueValue] phi_node
- # @param [Integer] index
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueValue] phi_node
+ # @param [Integer] index
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_incoming_block, :LLVMGetIncomingBlock, [OpaqueValue, :uint], OpaqueBasicBlock
-
# An instruction builder represents a point within a basic block, and is the
# exclusive means of building instructions using the C interface.
- #
+
# @method create_builder_in_context(c)
- # @param [OpaqueContext] c
- # @return [OpaqueBuilder]
+ # @param [OpaqueContext] c
+ # @return [OpaqueBuilder]
# @scope class
attach_function :create_builder_in_context, :LLVMCreateBuilderInContext, [OpaqueContext], OpaqueBuilder
-
# (Not documented)
- #
+
# @method create_builder()
- # @return [OpaqueBuilder]
+ # @return [OpaqueBuilder]
# @scope class
attach_function :create_builder, :LLVMCreateBuilder, [], OpaqueBuilder
-
# (Not documented)
- #
+
# @method position_builder(builder, block, instr)
- # @param [OpaqueBuilder] builder
- # @param [OpaqueBasicBlock] block
- # @param [OpaqueValue] instr
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @param [OpaqueBasicBlock] block
+ # @param [OpaqueValue] instr
+ # @return [nil]
# @scope class
attach_function :position_builder, :LLVMPositionBuilder, [OpaqueBuilder, OpaqueBasicBlock, OpaqueValue], :void
-
# (Not documented)
- #
+
# @method position_builder_before(builder, instr)
- # @param [OpaqueBuilder] builder
- # @param [OpaqueValue] instr
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @param [OpaqueValue] instr
+ # @return [nil]
# @scope class
attach_function :position_builder_before, :LLVMPositionBuilderBefore, [OpaqueBuilder, OpaqueValue], :void
-
# (Not documented)
- #
+
# @method position_builder_at_end(builder, block)
- # @param [OpaqueBuilder] builder
- # @param [OpaqueBasicBlock] block
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @param [OpaqueBasicBlock] block
+ # @return [nil]
# @scope class
attach_function :position_builder_at_end, :LLVMPositionBuilderAtEnd, [OpaqueBuilder, OpaqueBasicBlock], :void
-
# (Not documented)
- #
+
# @method get_insert_block(builder)
- # @param [OpaqueBuilder] builder
- # @return [OpaqueBasicBlock]
+ # @param [OpaqueBuilder] builder
+ # @return [OpaqueBasicBlock]
# @scope class
attach_function :get_insert_block, :LLVMGetInsertBlock, [OpaqueBuilder], OpaqueBasicBlock
-
# (Not documented)
- #
+
# @method clear_insertion_position(builder)
- # @param [OpaqueBuilder] builder
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @return [nil]
# @scope class
attach_function :clear_insertion_position, :LLVMClearInsertionPosition, [OpaqueBuilder], :void
-
# (Not documented)
- #
+
# @method insert_into_builder(builder, instr)
- # @param [OpaqueBuilder] builder
- # @param [OpaqueValue] instr
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @param [OpaqueValue] instr
+ # @return [nil]
# @scope class
attach_function :insert_into_builder, :LLVMInsertIntoBuilder, [OpaqueBuilder, OpaqueValue], :void
-
# (Not documented)
- #
+
# @method insert_into_builder_with_name(builder, instr, name)
- # @param [OpaqueBuilder] builder
- # @param [OpaqueValue] instr
- # @param [String] name
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @param [OpaqueValue] instr
+ # @param [String] name
+ # @return [nil]
# @scope class
attach_function :insert_into_builder_with_name, :LLVMInsertIntoBuilderWithName, [OpaqueBuilder, OpaqueValue, :string], :void
-
# (Not documented)
- #
+
# @method dispose_builder(builder)
- # @param [OpaqueBuilder] builder
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @return [nil]
# @scope class
attach_function :dispose_builder, :LLVMDisposeBuilder, [OpaqueBuilder], :void
-
# Metadata
- #
+
# @method set_current_debug_location(builder, l)
- # @param [OpaqueBuilder] builder
- # @param [OpaqueValue] l
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @param [OpaqueValue] l
+ # @return [nil]
# @scope class
attach_function :set_current_debug_location, :LLVMSetCurrentDebugLocation, [OpaqueBuilder, OpaqueValue], :void
-
# (Not documented)
- #
+
# @method get_current_debug_location(builder)
- # @param [OpaqueBuilder] builder
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] builder
+ # @return [OpaqueValue]
# @scope class
attach_function :get_current_debug_location, :LLVMGetCurrentDebugLocation, [OpaqueBuilder], OpaqueValue
-
# (Not documented)
- #
+
# @method set_inst_debug_location(builder, inst)
- # @param [OpaqueBuilder] builder
- # @param [OpaqueValue] inst
- # @return [nil]
+ # @param [OpaqueBuilder] builder
+ # @param [OpaqueValue] inst
+ # @return [nil]
# @scope class
attach_function :set_inst_debug_location, :LLVMSetInstDebugLocation, [OpaqueBuilder, OpaqueValue], :void
-
# Terminators
- #
+
# @method build_ret_void(opaque_builder)
- # @param [OpaqueBuilder] opaque_builder
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @return [OpaqueValue]
# @scope class
attach_function :build_ret_void, :LLVMBuildRetVoid, [OpaqueBuilder], OpaqueValue
-
# (Not documented)
- #
+
# @method build_ret(opaque_builder, v)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] v
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] v
+ # @return [OpaqueValue]
# @scope class
attach_function :build_ret, :LLVMBuildRet, [OpaqueBuilder, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method build_aggregate_ret(opaque_builder, ret_vals, n)
- # @param [OpaqueBuilder] opaque_builder
- # @param [FFI::Pointer(*ValueRef)] ret_vals
- # @param [Integer] n
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [FFI::Pointer(*ValueRef)] ret_vals
+ # @param [Integer] n
+ # @return [OpaqueValue]
# @scope class
attach_function :build_aggregate_ret, :LLVMBuildAggregateRet, [OpaqueBuilder, :pointer, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method build_br(opaque_builder, dest)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueBasicBlock] dest
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueBasicBlock] dest
+ # @return [OpaqueValue]
# @scope class
attach_function :build_br, :LLVMBuildBr, [OpaqueBuilder, OpaqueBasicBlock], OpaqueValue
-
# (Not documented)
- #
+
# @method build_cond_br(opaque_builder, if_, then_, else_)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] if_
- # @param [OpaqueBasicBlock] then_
- # @param [OpaqueBasicBlock] else_
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] if_
+ # @param [OpaqueBasicBlock] then_
+ # @param [OpaqueBasicBlock] else_
+ # @return [OpaqueValue]
# @scope class
attach_function :build_cond_br, :LLVMBuildCondBr, [OpaqueBuilder, OpaqueValue, OpaqueBasicBlock, OpaqueBasicBlock], OpaqueValue
-
# (Not documented)
- #
+
# @method build_switch(opaque_builder, v, else_, num_cases)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] v
- # @param [OpaqueBasicBlock] else_
- # @param [Integer] num_cases
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] v
+ # @param [OpaqueBasicBlock] else_
+ # @param [Integer] num_cases
+ # @return [OpaqueValue]
# @scope class
attach_function :build_switch, :LLVMBuildSwitch, [OpaqueBuilder, OpaqueValue, OpaqueBasicBlock, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method build_indirect_br(b, addr, num_dests)
- # @param [OpaqueBuilder] b
- # @param [OpaqueValue] addr
- # @param [Integer] num_dests
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [OpaqueValue] addr
+ # @param [Integer] num_dests
+ # @return [OpaqueValue]
# @scope class
attach_function :build_indirect_br, :LLVMBuildIndirectBr, [OpaqueBuilder, OpaqueValue, :uint], OpaqueValue
-
# (Not documented)
- #
+
# @method build_invoke(opaque_builder, fn, args, num_args, then_, catch, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] fn
- # @param [FFI::Pointer(*ValueRef)] args
- # @param [Integer] num_args
- # @param [OpaqueBasicBlock] then_
- # @param [OpaqueBasicBlock] catch
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] fn
+ # @param [FFI::Pointer(*ValueRef)] args
+ # @param [Integer] num_args
+ # @param [OpaqueBasicBlock] then_
+ # @param [OpaqueBasicBlock] catch
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_invoke, :LLVMBuildInvoke, [OpaqueBuilder, OpaqueValue, :pointer, :uint, OpaqueBasicBlock, OpaqueBasicBlock, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_landing_pad(b, ty, pers_fn, num_clauses, name)
- # @param [OpaqueBuilder] b
- # @param [OpaqueType] ty
- # @param [OpaqueValue] pers_fn
- # @param [Integer] num_clauses
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [OpaqueType] ty
+ # @param [OpaqueValue] pers_fn
+ # @param [Integer] num_clauses
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_landing_pad, :LLVMBuildLandingPad, [OpaqueBuilder, OpaqueType, OpaqueValue, :uint, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_resume(b, exn)
- # @param [OpaqueBuilder] b
- # @param [OpaqueValue] exn
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [OpaqueValue] exn
+ # @return [OpaqueValue]
# @scope class
attach_function :build_resume, :LLVMBuildResume, [OpaqueBuilder, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method build_unreachable(opaque_builder)
- # @param [OpaqueBuilder] opaque_builder
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @return [OpaqueValue]
# @scope class
attach_function :build_unreachable, :LLVMBuildUnreachable, [OpaqueBuilder], OpaqueValue
-
# Add a case to the switch instruction
- #
+
# @method add_case(switch, on_val, dest)
- # @param [OpaqueValue] switch
- # @param [OpaqueValue] on_val
- # @param [OpaqueBasicBlock] dest
- # @return [nil]
+ # @param [OpaqueValue] switch
+ # @param [OpaqueValue] on_val
+ # @param [OpaqueBasicBlock] dest
+ # @return [nil]
# @scope class
attach_function :add_case, :LLVMAddCase, [OpaqueValue, OpaqueValue, OpaqueBasicBlock], :void
-
# Add a destination to the indirectbr instruction
- #
+
# @method add_destination(indirect_br, dest)
- # @param [OpaqueValue] indirect_br
- # @param [OpaqueBasicBlock] dest
- # @return [nil]
+ # @param [OpaqueValue] indirect_br
+ # @param [OpaqueBasicBlock] dest
+ # @return [nil]
# @scope class
attach_function :add_destination, :LLVMAddDestination, [OpaqueValue, OpaqueBasicBlock], :void
-
# Add a catch or filter clause to the landingpad instruction
- #
+
# @method add_clause(landing_pad, clause_val)
- # @param [OpaqueValue] landing_pad
- # @param [OpaqueValue] clause_val
- # @return [nil]
+ # @param [OpaqueValue] landing_pad
+ # @param [OpaqueValue] clause_val
+ # @return [nil]
# @scope class
attach_function :add_clause, :LLVMAddClause, [OpaqueValue, OpaqueValue], :void
-
# Set the 'cleanup' flag in the landingpad instruction
- #
+
# @method set_cleanup(landing_pad, val)
- # @param [OpaqueValue] landing_pad
- # @param [Integer] val
- # @return [nil]
+ # @param [OpaqueValue] landing_pad
+ # @param [Integer] val
+ # @return [nil]
# @scope class
attach_function :set_cleanup, :LLVMSetCleanup, [OpaqueValue, :int], :void
-
# Arithmetic
- #
+
# @method build_add(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_add, :LLVMBuildAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_nsw_add(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_nsw_add, :LLVMBuildNSWAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_nuw_add(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_nuw_add, :LLVMBuildNUWAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_f_add(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_f_add, :LLVMBuildFAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_sub(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_sub, :LLVMBuildSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_nsw_sub(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_nsw_sub, :LLVMBuildNSWSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_nuw_sub(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_nuw_sub, :LLVMBuildNUWSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_f_sub(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_f_sub, :LLVMBuildFSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_mul(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_mul, :LLVMBuildMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_nsw_mul(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_nsw_mul, :LLVMBuildNSWMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_nuw_mul(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_nuw_mul, :LLVMBuildNUWMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_f_mul(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_f_mul, :LLVMBuildFMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_u_div(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_u_div, :LLVMBuildUDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_s_div(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_s_div, :LLVMBuildSDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_exact_s_div(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_exact_s_div, :LLVMBuildExactSDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_f_div(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_f_div, :LLVMBuildFDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_u_rem(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_u_rem, :LLVMBuildURem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_s_rem(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_s_rem, :LLVMBuildSRem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_f_rem(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_f_rem, :LLVMBuildFRem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_shl(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_shl, :LLVMBuildShl, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_l_shr(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_l_shr, :LLVMBuildLShr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_a_shr(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_a_shr, :LLVMBuildAShr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_and(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_and, :LLVMBuildAnd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_or(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_or, :LLVMBuildOr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_xor(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_xor, :LLVMBuildXor, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_bin_op(b, op, lhs, rhs, name)
- # @param [OpaqueBuilder] b
- # @param [Symbol from _enum_opcode_] op
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [Symbol from _enum_opcode_] op
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_bin_op, :LLVMBuildBinOp, [OpaqueBuilder, :opcode, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_neg(opaque_builder, v, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] v
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] v
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_neg, :LLVMBuildNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_nsw_neg(b, v, name)
- # @param [OpaqueBuilder] b
- # @param [OpaqueValue] v
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [OpaqueValue] v
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_nsw_neg, :LLVMBuildNSWNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_nuw_neg(b, v, name)
- # @param [OpaqueBuilder] b
- # @param [OpaqueValue] v
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [OpaqueValue] v
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_nuw_neg, :LLVMBuildNUWNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_f_neg(opaque_builder, v, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] v
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] v
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_f_neg, :LLVMBuildFNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_not(opaque_builder, v, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] v
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] v
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_not, :LLVMBuildNot, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue
-
# Memory
- #
+
# @method build_malloc(opaque_builder, ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueType] ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueType] ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_malloc, :LLVMBuildMalloc, [OpaqueBuilder, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_array_malloc(opaque_builder, ty, val, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueType] ty
- # @param [OpaqueValue] val
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueType] ty
+ # @param [OpaqueValue] val
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_array_malloc, :LLVMBuildArrayMalloc, [OpaqueBuilder, OpaqueType, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_alloca(opaque_builder, ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueType] ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueType] ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_alloca, :LLVMBuildAlloca, [OpaqueBuilder, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_array_alloca(opaque_builder, ty, val, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueType] ty
- # @param [OpaqueValue] val
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueType] ty
+ # @param [OpaqueValue] val
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_array_alloca, :LLVMBuildArrayAlloca, [OpaqueBuilder, OpaqueType, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_free(opaque_builder, pointer_val)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] pointer_val
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] pointer_val
+ # @return [OpaqueValue]
# @scope class
attach_function :build_free, :LLVMBuildFree, [OpaqueBuilder, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method build_load(opaque_builder, pointer_val, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] pointer_val
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] pointer_val
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_load, :LLVMBuildLoad, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_store(opaque_builder, val, ptr)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueValue] ptr
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueValue] ptr
+ # @return [OpaqueValue]
# @scope class
attach_function :build_store, :LLVMBuildStore, [OpaqueBuilder, OpaqueValue, OpaqueValue], OpaqueValue
-
# (Not documented)
- #
+
# @method build_gep(b, pointer, indices, num_indices, name)
- # @param [OpaqueBuilder] b
- # @param [OpaqueValue] pointer
- # @param [FFI::Pointer(*ValueRef)] indices
- # @param [Integer] num_indices
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [OpaqueValue] pointer
+ # @param [FFI::Pointer(*ValueRef)] indices
+ # @param [Integer] num_indices
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_gep, :LLVMBuildGEP, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_in_bounds_gep(b, pointer, indices, num_indices, name)
- # @param [OpaqueBuilder] b
- # @param [OpaqueValue] pointer
- # @param [FFI::Pointer(*ValueRef)] indices
- # @param [Integer] num_indices
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [OpaqueValue] pointer
+ # @param [FFI::Pointer(*ValueRef)] indices
+ # @param [Integer] num_indices
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_in_bounds_gep, :LLVMBuildInBoundsGEP, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_struct_gep(b, pointer, idx, name)
- # @param [OpaqueBuilder] b
- # @param [OpaqueValue] pointer
- # @param [Integer] idx
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [OpaqueValue] pointer
+ # @param [Integer] idx
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_struct_gep, :LLVMBuildStructGEP, [OpaqueBuilder, OpaqueValue, :uint, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_global_string(b, str, name)
- # @param [OpaqueBuilder] b
- # @param [String] str
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [String] str
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_global_string, :LLVMBuildGlobalString, [OpaqueBuilder, :string, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_global_string_ptr(b, str, name)
- # @param [OpaqueBuilder] b
- # @param [String] str
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [String] str
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_global_string_ptr, :LLVMBuildGlobalStringPtr, [OpaqueBuilder, :string, :string], OpaqueValue
-
# Casts
- #
+
# @method build_trunc(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_trunc, :LLVMBuildTrunc, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_z_ext(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_z_ext, :LLVMBuildZExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_s_ext(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_s_ext, :LLVMBuildSExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_fp_to_ui(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_fp_to_ui, :LLVMBuildFPToUI, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_fp_to_si(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_fp_to_si, :LLVMBuildFPToSI, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_ui_to_fp(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_ui_to_fp, :LLVMBuildUIToFP, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_si_to_fp(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_si_to_fp, :LLVMBuildSIToFP, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_fp_trunc(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_fp_trunc, :LLVMBuildFPTrunc, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_fp_ext(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_fp_ext, :LLVMBuildFPExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_ptr_to_int(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_ptr_to_int, :LLVMBuildPtrToInt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_int_to_ptr(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_int_to_ptr, :LLVMBuildIntToPtr, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_bit_cast(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_bit_cast, :LLVMBuildBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_z_ext_or_bit_cast(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_z_ext_or_bit_cast, :LLVMBuildZExtOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_s_ext_or_bit_cast(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_s_ext_or_bit_cast, :LLVMBuildSExtOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_trunc_or_bit_cast(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_trunc_or_bit_cast, :LLVMBuildTruncOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_cast(b, op, val, dest_ty, name)
- # @param [OpaqueBuilder] b
- # @param [Symbol from _enum_opcode_] op
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] b
+ # @param [Symbol from _enum_opcode_] op
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_cast, :LLVMBuildCast, [OpaqueBuilder, :opcode, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_pointer_cast(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_pointer_cast, :LLVMBuildPointerCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_int_cast(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_int_cast, :LLVMBuildIntCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_fp_cast(opaque_builder, val, dest_ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [OpaqueType] dest_ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [OpaqueType] dest_ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_fp_cast, :LLVMBuildFPCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# Comparisons
- #
+
# @method build_i_cmp(opaque_builder, op, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [Symbol from _enum_int_predicate_] op
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [Symbol from _enum_int_predicate_] op
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_i_cmp, :LLVMBuildICmp, [OpaqueBuilder, :int_predicate, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_f_cmp(opaque_builder, op, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [Symbol from _enum_real_predicate_] op
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [Symbol from _enum_real_predicate_] op
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_f_cmp, :LLVMBuildFCmp, [OpaqueBuilder, :real_predicate, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# Miscellaneous instructions
- #
+
# @method build_phi(opaque_builder, ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueType] ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueType] ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_phi, :LLVMBuildPhi, [OpaqueBuilder, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_call(opaque_builder, fn, args, num_args, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] fn
- # @param [FFI::Pointer(*ValueRef)] args
- # @param [Integer] num_args
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] fn
+ # @param [FFI::Pointer(*ValueRef)] args
+ # @param [Integer] num_args
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_call, :LLVMBuildCall, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_select(opaque_builder, if_, then_, else_, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] if_
- # @param [OpaqueValue] then_
- # @param [OpaqueValue] else_
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] if_
+ # @param [OpaqueValue] then_
+ # @param [OpaqueValue] else_
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_select, :LLVMBuildSelect, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_va_arg(opaque_builder, list, ty, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] list
- # @param [OpaqueType] ty
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] list
+ # @param [OpaqueType] ty
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_va_arg, :LLVMBuildVAArg, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_extract_element(opaque_builder, vec_val, index, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] vec_val
- # @param [OpaqueValue] index
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] vec_val
+ # @param [OpaqueValue] index
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_extract_element, :LLVMBuildExtractElement, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_insert_element(opaque_builder, vec_val, elt_val, index, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] vec_val
- # @param [OpaqueValue] elt_val
- # @param [OpaqueValue] index
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] vec_val
+ # @param [OpaqueValue] elt_val
+ # @param [OpaqueValue] index
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_insert_element, :LLVMBuildInsertElement, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_shuffle_vector(opaque_builder, v1, v2, mask, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] v1
- # @param [OpaqueValue] v2
- # @param [OpaqueValue] mask
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] v1
+ # @param [OpaqueValue] v2
+ # @param [OpaqueValue] mask
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_shuffle_vector, :LLVMBuildShuffleVector, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_extract_value(opaque_builder, agg_val, index, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] agg_val
- # @param [Integer] index
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] agg_val
+ # @param [Integer] index
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_extract_value, :LLVMBuildExtractValue, [OpaqueBuilder, OpaqueValue, :uint, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_insert_value(opaque_builder, agg_val, elt_val, index, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] agg_val
- # @param [OpaqueValue] elt_val
- # @param [Integer] index
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] agg_val
+ # @param [OpaqueValue] elt_val
+ # @param [Integer] index
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_insert_value, :LLVMBuildInsertValue, [OpaqueBuilder, OpaqueValue, OpaqueValue, :uint, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_is_null(opaque_builder, val, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_is_null, :LLVMBuildIsNull, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_is_not_null(opaque_builder, val, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] val
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] val
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_is_not_null, :LLVMBuildIsNotNull, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue
-
# (Not documented)
- #
+
# @method build_ptr_diff(opaque_builder, lhs, rhs, name)
- # @param [OpaqueBuilder] opaque_builder
- # @param [OpaqueValue] lhs
- # @param [OpaqueValue] rhs
- # @param [String] name
- # @return [OpaqueValue]
+ # @param [OpaqueBuilder] opaque_builder
+ # @param [OpaqueValue] lhs
+ # @param [OpaqueValue] rhs
+ # @param [String] name
+ # @return [OpaqueValue]
# @scope class
attach_function :build_ptr_diff, :LLVMBuildPtrDiff, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue
-
# Changes the type of M so it can be passed to FunctionPassManagers and the
# JIT. They take ModuleProviders for historical reasons.
- #
+
# @method create_module_provider_for_existing_module(m)
- # @param [OpaqueModule] m
- # @return [OpaqueModuleProvider]
+ # @param [OpaqueModule] m
+ # @return [OpaqueModuleProvider]
# @scope class
attach_function :create_module_provider_for_existing_module, :LLVMCreateModuleProviderForExistingModule, [OpaqueModule], OpaqueModuleProvider
-
# Destroys the module M.
- #
+
# @method dispose_module_provider(m)
- # @param [OpaqueModuleProvider] m
- # @return [nil]
+ # @param [OpaqueModuleProvider] m
+ # @return [nil]
# @scope class
attach_function :dispose_module_provider, :LLVMDisposeModuleProvider, [OpaqueModuleProvider], :void
-
# ===-- Memory buffers ----------------------------------------------------===
- #
+
# @method create_memory_buffer_with_contents_of_file(path, out_mem_buf, out_message)
- # @param [String] path
- # @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [String] path
+ # @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :create_memory_buffer_with_contents_of_file, :LLVMCreateMemoryBufferWithContentsOfFile, [:string, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method create_memory_buffer_with_stdin(out_mem_buf, out_message)
- # @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf
- # @param [FFI::Pointer(**CharS)] out_message
- # @return [Integer]
+ # @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf
+ # @param [FFI::Pointer(**CharS)] out_message
+ # @return [Integer]
# @scope class
attach_function :create_memory_buffer_with_stdin, :LLVMCreateMemoryBufferWithSTDIN, [:pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method dispose_memory_buffer(mem_buf)
- # @param [OpaqueMemoryBuffer] mem_buf
- # @return [nil]
+ # @param [OpaqueMemoryBuffer] mem_buf
+ # @return [nil]
# @scope class
attach_function :dispose_memory_buffer, :LLVMDisposeMemoryBuffer, [OpaqueMemoryBuffer], :void
-
# Return the global pass registry, for use with initialization functions.
# See llvm::PassRegistry::getPassRegistry.
- #
+
# @method get_global_pass_registry()
- # @return [OpaquePassRegistry]
+ # @return [OpaquePassRegistry]
# @scope class
attach_function :get_global_pass_registry, :LLVMGetGlobalPassRegistry, [], OpaquePassRegistry
-
# Constructs a new whole-module pass pipeline. This type of pipeline is
# suitable for link-time optimization and whole-module transformations.
# See llvm::PassManager::PassManager.
- #
+
# @method create_pass_manager()
- # @return [OpaquePassManager]
+ # @return [OpaquePassManager]
# @scope class
attach_function :create_pass_manager, :LLVMCreatePassManager, [], OpaquePassManager
-
# Constructs a new function-by-function pass pipeline over the module
# provider. It does not take ownership of the module provider. This type of
# pipeline is suitable for code generation and JIT compilation tasks.
# See llvm::FunctionPassManager::FunctionPassManager.
- #
+
# @method create_function_pass_manager_for_module(m)
- # @param [OpaqueModule] m
- # @return [OpaquePassManager]
+ # @param [OpaqueModule] m
+ # @return [OpaquePassManager]
# @scope class
attach_function :create_function_pass_manager_for_module, :LLVMCreateFunctionPassManagerForModule, [OpaqueModule], OpaquePassManager
-
# Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.
- #
+
# @method create_function_pass_manager(mp)
- # @param [OpaqueModuleProvider] mp
- # @return [OpaquePassManager]
+ # @param [OpaqueModuleProvider] mp
+ # @return [OpaquePassManager]
# @scope class
attach_function :create_function_pass_manager, :LLVMCreateFunctionPassManager, [OpaqueModuleProvider], OpaquePassManager
-
# Initializes, executes on the provided module, and finalizes all of the
# passes scheduled in the pass manager. Returns 1 if any of the passes
# modified the module, 0 otherwise. See llvm::PassManager::run(Module&).
- #
+
# @method run_pass_manager(pm, m)
- # @param [OpaquePassManager] pm
- # @param [OpaqueModule] m
- # @return [Integer]
+ # @param [OpaquePassManager] pm
+ # @param [OpaqueModule] m
+ # @return [Integer]
# @scope class
attach_function :run_pass_manager, :LLVMRunPassManager, [OpaquePassManager, OpaqueModule], :int
-
# Initializes all of the function passes scheduled in the function pass
# manager. Returns 1 if any of the passes modified the module, 0 otherwise.
# See llvm::FunctionPassManager::doInitialization.
- #
+
# @method initialize_function_pass_manager(fpm)
- # @param [OpaquePassManager] fpm
- # @return [Integer]
+ # @param [OpaquePassManager] fpm
+ # @return [Integer]
# @scope class
attach_function :initialize_function_pass_manager, :LLVMInitializeFunctionPassManager, [OpaquePassManager], :int
-
# Executes all of the function passes scheduled in the function pass manager
# on the provided function. Returns 1 if any of the passes modified the
# function, false otherwise.
# See llvm::FunctionPassManager::run(Function&).
- #
+
# @method run_function_pass_manager(fpm, f)
- # @param [OpaquePassManager] fpm
- # @param [OpaqueValue] f
- # @return [Integer]
+ # @param [OpaquePassManager] fpm
+ # @param [OpaqueValue] f
+ # @return [Integer]
# @scope class
attach_function :run_function_pass_manager, :LLVMRunFunctionPassManager, [OpaquePassManager, OpaqueValue], :int
-
# Finalizes all of the function passes scheduled in in the function pass
# manager. Returns 1 if any of the passes modified the module, 0 otherwise.
# See llvm::FunctionPassManager::doFinalization.
- #
+
# @method finalize_function_pass_manager(fpm)
- # @param [OpaquePassManager] fpm
- # @return [Integer]
+ # @param [OpaquePassManager] fpm
+ # @return [Integer]
# @scope class
attach_function :finalize_function_pass_manager, :LLVMFinalizeFunctionPassManager, [OpaquePassManager], :int
-
# Frees the memory of a pass pipeline. For function pipelines, does not free
# the module provider.
# See llvm::PassManagerBase::~PassManagerBase.
- #
+
# @method dispose_pass_manager(pm)
- # @param [OpaquePassManager] pm
- # @return [nil]
+ # @param [OpaquePassManager] pm
+ # @return [nil]
# @scope class
attach_function :dispose_pass_manager, :LLVMDisposePassManager, [OpaquePassManager], :void
-
end
diff --git a/test/output/llvm-c/Disassembler.rb b/test/output/llvm-c/Disassembler.rb
index d376ed2..763f2f2 100644
--- a/test/output/llvm-c/Disassembler.rb
+++ b/test/output/llvm-c/Disassembler.rb
@@ -1,35 +1,37 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
DISASSEMBLER_VARIANT_KIND_NONE = 0
-
+
DISASSEMBLER_VARIANT_KIND_ARM_HI16 = 1
-
+
DISASSEMBLER_VARIANT_KIND_ARM_LO16 = 2
-
+
DISASSEMBLER_REFERENCE_TYPE_IN_OUT_NONE = 0
-
+
DISASSEMBLER_REFERENCE_TYPE_IN_BRANCH = 1
-
+
DISASSEMBLER_REFERENCE_TYPE_IN_P_CREL_LOAD = 2
-
+
DISASSEMBLER_REFERENCE_TYPE_OUT_SYMBOL_STUB = 1
-
+
DISASSEMBLER_REFERENCE_TYPE_OUT_LIT_POOL_SYM_ADDR = 2
-
+
DISASSEMBLER_REFERENCE_TYPE_OUT_LIT_POOL_CSTR_ADDR = 3
-
+
# The type for the operand information call back function. This is called to
# get the symbolic information for an operand of an instruction. Typically
# this is from the relocation information, symbol table, etc. That block of
@@ -45,26 +47,27 @@ def self.attach_function(name, *_)
# Triple specific with its specific information defined by the value of
# TagType for that Triple. If symbolic information is returned the function
# returns 1, otherwise it returns 0.
- #
+
# This entry is only for documentation and no real method.
- #
- # @method _callback_op_info_callback_(pc, offset, size, tag_type, tag_buf)
- # @param [Integer] pc
- # @param [Integer] offset
- # @param [Integer] size
- # @param [Integer] tag_type
- # @param [FFI::Pointer(*Void)] tag_buf
- # @return [FFI::Pointer(*Void)]
+
+ # @method _callback_op_info_callback_(dis_info, pc, offset, size, tag_type, tag_buf)
+ # @param [FFI::Pointer(*Void)] dis_info
+ # @param [Integer] pc
+ # @param [Integer] offset
+ # @param [Integer] size
+ # @param [Integer] tag_type
+ # @param [FFI::Pointer(*Void)] tag_buf
+ # @return [FFI::Pointer(*Void)]
# @scope class
- callback :op_info_callback, [:ulong, :ulong, :ulong, :int, :pointer], :pointer
-
+ callback :op_info_callback, [:pointer, :ulong_long, :ulong_long, :ulong_long, :int, :pointer], :pointer
+
# The initial support in LLVM MC for the most general form of a relocatable
# expression is "AddSymbol - SubtractSymbol + Offset". For some Darwin targets
# this full form is encoded in the relocation information so that AddSymbol and
# SubtractSymbol can be link edited independent of each other. Many other
# platforms only allow a relocatable expression of the form AddSymbol + Offset
# to be encoded.
- #
+
# The LLVMOpInfoCallback() for the TagType value of 1 uses the struct
# LLVMOpInfo1. The value of the relocatable expression for the operand,
# including any PC adjustment, is passed in to the call back in the Value
@@ -76,7 +79,7 @@ def self.attach_function(name, *_)
# symbol names are present in the relocation information. The VariantKind
# type is one of the Target specific #defines below and is used to print
# operands like "_foo@GOT", ":lower16:_foo", etc.
- #
+
# = Fields:
# :present ::
# (Integer) 1 if this symbol is present
@@ -85,29 +88,29 @@ def self.attach_function(name, *_)
# :value ::
# (Integer) symbol value if name is NULL
class OpInfoSymbol1 < FFI::Struct
- layout :present, :ulong,
+ layout :present, :ulong_long,
:name, :string,
- :value, :ulong
+ :value, :ulong_long
end
-
+
# (Not documented)
- #
+
# = Fields:
# :add_symbol ::
- # (OpInfoSymbol1)
+ # (OpInfoSymbol1)
# :subtract_symbol ::
- # (OpInfoSymbol1)
+ # (OpInfoSymbol1)
# :value ::
- # (Integer)
+ # (Integer)
# :variant_kind ::
- # (Integer)
+ # (Integer)
class OpInfo1 < FFI::Struct
layout :add_symbol, OpInfoSymbol1.by_value,
:subtract_symbol, OpInfoSymbol1.by_value,
- :value, :ulong,
- :variant_kind, :ulong
+ :value, :ulong_long,
+ :variant_kind, :ulong_long
end
-
+
# The type for the symbol lookup function. This may be called by the
# disassembler for things like adding a comment for a PC plus a constant
# offset load instruction to use a symbol name instead of a load address value.
@@ -118,42 +121,41 @@ class OpInfo1 < FFI::Struct
# ReferencePC. If the output reference can be determined its type is returned
# indirectly in ReferenceType along with ReferenceName if any, or that is set
# to NULL.
- #
+
# This entry is only for documentation and no real method.
- #
- # @method _callback_symbol_lookup_callback_(reference_value, reference_type, reference_pc, reference_name)
- # @param [Integer] reference_value
- # @param [FFI::Pointer(*Uint64T)] reference_type
- # @param [Integer] reference_pc
- # @param [FFI::Pointer(**CharS)] reference_name
- # @return [FFI::Pointer(*Void)]
+
+ # @method _callback_symbol_lookup_callback_(dis_info, reference_value, reference_type, reference_pc, reference_name)
+ # @param [FFI::Pointer(*Void)] dis_info
+ # @param [Integer] reference_value
+ # @param [FFI::Pointer(*Uint64T)] reference_type
+ # @param [Integer] reference_pc
+ # @param [FFI::Pointer(**CharS)] reference_name
+ # @return [FFI::Pointer(*Void)]
# @scope class
- callback :symbol_lookup_callback, [:ulong, :pointer, :ulong, :pointer], :pointer
-
+ callback :symbol_lookup_callback, [:pointer, :ulong_long, :pointer, :ulong_long, :pointer], :pointer
+
# Create a disassembler for the TripleName. Symbolic disassembly is supported
# by passing a block of information in the DisInfo parameter and specifying the
# TagType and callback functions as described above. These can all be passed
# as NULL. If successful, this returns a disassembler context. If not, it
# returns NULL.
- #
+
# @method create_disasm(triple_name, dis_info, tag_type, get_op_info, symbol_look_up)
- # @param [String] triple_name
- # @param [FFI::Pointer(*Void)] dis_info
- # @param [Integer] tag_type
- # @param [Proc(_callback_op_info_callback_)] get_op_info
- # @param [Proc(_callback_symbol_lookup_callback_)] symbol_look_up
- # @return [FFI::Pointer(DisasmContextRef)]
+ # @param [String] triple_name
+ # @param [FFI::Pointer(*Void)] dis_info
+ # @param [Integer] tag_type
+ # @param [FFI::Pointer(OpInfoCallback)] get_op_info
+ # @param [FFI::Pointer(SymbolLookupCallback)] symbol_look_up
+ # @return [FFI::Pointer(DisasmContextRef)]
# @scope class
- attach_function :create_disasm, :LLVMCreateDisasm, [:string, :pointer, :int, :op_info_callback, :symbol_lookup_callback], :pointer
-
+ attach_function :create_disasm, :LLVMCreateDisasm, [:string, :pointer, :int, :pointer, :pointer], :pointer
# Dispose of a disassembler context.
- #
+
# @method disasm_dispose(dc)
- # @param [FFI::Pointer(DisasmContextRef)] dc
- # @return [nil]
+ # @param [FFI::Pointer(DisasmContextRef)] dc
+ # @return [nil]
# @scope class
attach_function :disasm_dispose, :LLVMDisasmDispose, [:pointer], :void
-
# Disassemble a single instruction using the disassembler context specified in
# the parameter DC. The bytes of the instruction are specified in the
# parameter Bytes, and contains at least BytesSize number of bytes. The
@@ -162,16 +164,15 @@ class OpInfo1 < FFI::Struct
# OutString whose size is specified in the parameter OutStringSize. This
# function returns the number of bytes in the instruction or zero if there was
# no valid instruction.
- #
+
# @method disasm_instruction(dc, bytes, bytes_size, pc, out_string, out_string_size)
- # @param [FFI::Pointer(DisasmContextRef)] dc
- # @param [FFI::Pointer(*Uint8T)] bytes
- # @param [Integer] bytes_size
- # @param [Integer] pc
- # @param [String] out_string
- # @param [Integer] out_string_size
- # @return [Integer]
+ # @param [FFI::Pointer(DisasmContextRef)] dc
+ # @param [FFI::Pointer(*Uint8T)] bytes
+ # @param [Integer] bytes_size
+ # @param [Integer] pc
+ # @param [String] out_string
+ # @param [Integer] out_string_size
+ # @return [Integer]
# @scope class
- attach_function :disasm_instruction, :LLVMDisasmInstruction, [:pointer, :pointer, :ulong, :ulong, :string, :ulong], :ulong
-
+ attach_function :disasm_instruction, :LLVMDisasmInstruction, [:pointer, :pointer, :ulong_long, :ulong_long, :string, :int], :int
end
diff --git a/test/output/llvm-c/EnhancedDisassembly.rb b/test/output/llvm-c/EnhancedDisassembly.rb
index 8dcfd83..24fe198 100644
--- a/test/output/llvm-c/EnhancedDisassembly.rb
+++ b/test/output/llvm-c/EnhancedDisassembly.rb
@@ -1,17 +1,19 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# !
# @typedef EDByteReaderCallback
# Interface to memory from which instructions may be read.
@@ -19,16 +21,17 @@ def self.attach_function(name, *_)
# @param address The address of the byte to be read.
# @param arg An anonymous argument for client use.
# @result 0 on success; -1 otherwise.
- #
+
# This entry is only for documentation and no real method.
- #
- # @method _callback_ed_byte_reader_callback_(address, arg)
- # @param [Integer] address
- # @param [FFI::Pointer(*Void)] arg
- # @return [FFI::Pointer(*Uint8T)]
+
+ # @method _callback_ed_byte_reader_callback_(byte, address, arg)
+ # @param [FFI::Pointer(*Uint8T)] byte
+ # @param [Integer] address
+ # @param [FFI::Pointer(*Void)] arg
+ # @return [FFI::Pointer(*Uint8T)]
# @scope class
- callback :ed_byte_reader_callback, [:ulong, :pointer], :pointer
-
+ callback :ed_byte_reader_callback, [:pointer, :ulong_long, :pointer], :pointer
+
# !
# @typedef EDRegisterReaderCallback
# Interface to registers from which registers may be read.
@@ -37,16 +40,40 @@ def self.attach_function(name, *_)
# @param regID The LLVM register identifier for the register to read.
# @param arg An anonymous argument for client use.
# @result 0 if the register could be read; -1 otherwise.
- #
+
# This entry is only for documentation and no real method.
- #
- # @method _callback_ed_register_reader_callback_(reg_id, arg)
- # @param [Integer] reg_id
- # @param [FFI::Pointer(*Void)] arg
- # @return [FFI::Pointer(*Uint64T)]
+
+ # @method _callback_ed_register_reader_callback_(value, reg_id, arg)
+ # @param [FFI::Pointer(*Uint64T)] value
+ # @param [Integer] reg_id
+ # @param [FFI::Pointer(*Void)] arg
+ # @return [FFI::Pointer(*Uint64T)]
# @scope class
- callback :ed_register_reader_callback, [:uint, :pointer], :pointer
-
+ callback :ed_register_reader_callback, [:pointer, :uint, :pointer], :pointer
+
+ # !
+ # @typedef EDAssemblySyntax_t
+ # An assembly syntax for use in tokenizing instructions.
+
+ # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:k_ed_assembly_syntax_x86_intel3874185085).
+
+ # === Options:
+ # :x86_intel ::
+ # ! @constant kEDAssemblySyntaxX86Intel Intel syntax for i386 and x86_64.
+ # :x86att ::
+ # ! @constant kEDAssemblySyntaxX86ATT AT&T syntax for i386 and x86_64.
+ # :armual ::
+
+
+ # @method _enum_k_ed_assembly_syntax_x86_intel3874185085_
+ # @return [Symbol]
+ # @scope class
+ enum :k_ed_assembly_syntax_x86_intel3874185085, [
+ :x86_intel, 0,
+ :x86att, 1,
+ :armual, 2
+ ]
+
# !
# @function EDGetDisassembler
# Gets the disassembler for a given target.
@@ -55,15 +82,14 @@ def self.attach_function(name, *_)
# @param triple Identifies the target. Example: "x86_64-apple-darwin10"
# @param syntax The assembly syntax to use when decoding instructions.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_get_disassembler(disassembler, triple, syntax)
- # @param [FFI::Pointer(*EDDisassemblerRef)] disassembler
- # @param [String] triple
- # @param [Integer] syntax
- # @return [Integer]
+ # @param [FFI::Pointer(*EDDisassemblerRef)] disassembler
+ # @param [String] triple
+ # @param [Integer] syntax
+ # @return [Integer]
# @scope class
attach_function :ed_get_disassembler, :EDGetDisassembler, [:pointer, :string, :uint], :int
-
# !
# @function EDGetRegisterName
# Gets the human-readable name for a given register.
@@ -72,43 +98,40 @@ def self.attach_function(name, *_)
# @param disassembler The disassembler to query for the name.
# @param regID The register identifier, as returned by EDRegisterTokenValue.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_get_register_name(reg_name, disassembler, reg_id)
- # @param [FFI::Pointer(**CharS)] reg_name
- # @param [FFI::Pointer(EDDisassemblerRef)] disassembler
- # @param [Integer] reg_id
- # @return [Integer]
+ # @param [FFI::Pointer(**CharS)] reg_name
+ # @param [FFI::Pointer(EDDisassemblerRef)] disassembler
+ # @param [Integer] reg_id
+ # @return [Integer]
# @scope class
attach_function :ed_get_register_name, :EDGetRegisterName, [:pointer, :pointer, :uint], :int
-
# !
# @function EDRegisterIsStackPointer
# Determines if a register is one of the platform's stack-pointer registers.
# @param disassembler The disassembler to query.
# @param regID The register identifier, as returned by EDRegisterTokenValue.
# @result 1 if true; 0 otherwise.
- #
+
# @method ed_register_is_stack_pointer(disassembler, reg_id)
- # @param [FFI::Pointer(EDDisassemblerRef)] disassembler
- # @param [Integer] reg_id
- # @return [Integer]
+ # @param [FFI::Pointer(EDDisassemblerRef)] disassembler
+ # @param [Integer] reg_id
+ # @return [Integer]
# @scope class
attach_function :ed_register_is_stack_pointer, :EDRegisterIsStackPointer, [:pointer, :uint], :int
-
# !
# @function EDRegisterIsProgramCounter
# Determines if a register is one of the platform's stack-pointer registers.
# @param disassembler The disassembler to query.
# @param regID The register identifier, as returned by EDRegisterTokenValue.
# @result 1 if true; 0 otherwise.
- #
+
# @method ed_register_is_program_counter(disassembler, reg_id)
- # @param [FFI::Pointer(EDDisassemblerRef)] disassembler
- # @param [Integer] reg_id
- # @return [Integer]
+ # @param [FFI::Pointer(EDDisassemblerRef)] disassembler
+ # @param [Integer] reg_id
+ # @return [Integer]
# @scope class
attach_function :ed_register_is_program_counter, :EDRegisterIsProgramCounter, [:pointer, :uint], :int
-
# !
# @function EDCreateInst
# Gets a set of contiguous instructions from a disassembler.
@@ -122,41 +145,38 @@ def self.attach_function(name, *_)
# @param address The address of the first byte of the instruction.
# @param arg An anonymous argument to be passed to byteReader.
# @result The number of instructions read on success; 0 otherwise.
- #
+
# @method ed_create_insts(insts, count, disassembler, byte_reader, address, arg)
- # @param [FFI::Pointer(*EDInstRef)] insts
- # @param [Integer] count
- # @param [FFI::Pointer(EDDisassemblerRef)] disassembler
- # @param [Proc(_callback_ed_byte_reader_callback_)] byte_reader
- # @param [Integer] address
- # @param [FFI::Pointer(*Void)] arg
- # @return [Integer]
+ # @param [FFI::Pointer(*EDInstRef)] insts
+ # @param [Integer] count
+ # @param [FFI::Pointer(EDDisassemblerRef)] disassembler
+ # @param [FFI::Pointer(EDByteReaderCallback)] byte_reader
+ # @param [Integer] address
+ # @param [FFI::Pointer(*Void)] arg
+ # @return [Integer]
# @scope class
- attach_function :ed_create_insts, :EDCreateInsts, [:pointer, :uint, :pointer, :ed_byte_reader_callback, :ulong, :pointer], :uint
-
+ attach_function :ed_create_insts, :EDCreateInsts, [:pointer, :uint, :pointer, :pointer, :ulong_long, :pointer], :uint
# !
# @function EDReleaseInst
# Frees the memory for an instruction. The instruction can no longer be accessed
# after this call.
# @param inst The instruction to be freed.
- #
+
# @method ed_release_inst(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [nil]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [nil]
# @scope class
attach_function :ed_release_inst, :EDReleaseInst, [:pointer], :void
-
# !
# @function EDInstByteSize
# @param inst The instruction to be queried.
# @result The number of bytes in the instruction's machine-code representation.
- #
+
# @method ed_inst_byte_size(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_inst_byte_size, :EDInstByteSize, [:pointer], :int
-
# !
# @function EDGetInstString
# Gets the disassembled text equivalent of the instruction.
@@ -164,99 +184,91 @@ def self.attach_function(name, *_)
# string. (The string becomes invalid when the instruction is released.)
# @param inst The instruction to be queried.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_get_inst_string(buf, inst)
- # @param [FFI::Pointer(**CharS)] buf
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(**CharS)] buf
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_get_inst_string, :EDGetInstString, [:pointer, :pointer], :int
-
# !
# @function EDInstID
# @param instID A pointer whose target will be filled in with the LLVM identifier
# for the instruction.
# @param inst The instruction to be queried.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_inst_id(inst_id, inst)
- # @param [FFI::Pointer(*UInt)] inst_id
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(*UInt)] inst_id
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_inst_id, :EDInstID, [:pointer, :pointer], :int
-
# !
# @function EDInstIsBranch
# @param inst The instruction to be queried.
# @result 1 if the instruction is a branch instruction; 0 if it is some other
# type of instruction; -1 if there was an error.
- #
+
# @method ed_inst_is_branch(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_inst_is_branch, :EDInstIsBranch, [:pointer], :int
-
# !
# @function EDInstIsMove
# @param inst The instruction to be queried.
# @result 1 if the instruction is a move instruction; 0 if it is some other
# type of instruction; -1 if there was an error.
- #
+
# @method ed_inst_is_move(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_inst_is_move, :EDInstIsMove, [:pointer], :int
-
# !
# @function EDBranchTargetID
# @param inst The instruction to be queried.
# @result The ID of the branch target operand, suitable for use with
# EDCopyOperand. -1 if no such operand exists.
- #
+
# @method ed_branch_target_id(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_branch_target_id, :EDBranchTargetID, [:pointer], :int
-
# !
# @function EDMoveSourceID
# @param inst The instruction to be queried.
# @result The ID of the move source operand, suitable for use with
# EDCopyOperand. -1 if no such operand exists.
- #
+
# @method ed_move_source_id(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_move_source_id, :EDMoveSourceID, [:pointer], :int
-
# !
# @function EDMoveTargetID
# @param inst The instruction to be queried.
# @result The ID of the move source operand, suitable for use with
# EDCopyOperand. -1 if no such operand exists.
- #
+
# @method ed_move_target_id(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_move_target_id, :EDMoveTargetID, [:pointer], :int
-
# !
# @function EDNumTokens
# @param inst The instruction to be queried.
# @result The number of tokens in the instruction, or -1 on error.
- #
+
# @method ed_num_tokens(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_num_tokens, :EDNumTokens, [:pointer], :int
-
# !
# @function EDGetToken
# Retrieves a token from an instruction. The token is valid until the
@@ -265,15 +277,14 @@ def self.attach_function(name, *_)
# @param inst The instruction to be queried.
# @param index The index of the token in the instruction.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_get_token(token, inst, index)
- # @param [FFI::Pointer(*EDTokenRef)] token
- # @param [FFI::Pointer(EDInstRef)] inst
- # @param [Integer] index
- # @return [Integer]
+ # @param [FFI::Pointer(*EDTokenRef)] token
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @param [Integer] index
+ # @return [Integer]
# @scope class
attach_function :ed_get_token, :EDGetToken, [:pointer, :pointer, :int], :int
-
# !
# @function EDGetTokenString
# Gets the disassembled text for a token.
@@ -281,131 +292,120 @@ def self.attach_function(name, *_)
# string. (The string becomes invalid when the token is released.)
# @param token The token to be queried.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_get_token_string(buf, token)
- # @param [FFI::Pointer(**CharS)] buf
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(**CharS)] buf
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_get_token_string, :EDGetTokenString, [:pointer, :pointer], :int
-
# !
# @function EDOperandIndexForToken
# Returns the index of the operand to which a token belongs.
# @param token The token to be queried.
# @result The operand index on success; -1 otherwise
- #
+
# @method ed_operand_index_for_token(token)
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_operand_index_for_token, :EDOperandIndexForToken, [:pointer], :int
-
# !
# @function EDTokenIsWhitespace
# @param token The token to be queried.
# @result 1 if the token is whitespace; 0 if not; -1 on error.
- #
+
# @method ed_token_is_whitespace(token)
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_token_is_whitespace, :EDTokenIsWhitespace, [:pointer], :int
-
# !
# @function EDTokenIsPunctuation
# @param token The token to be queried.
# @result 1 if the token is punctuation; 0 if not; -1 on error.
- #
+
# @method ed_token_is_punctuation(token)
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_token_is_punctuation, :EDTokenIsPunctuation, [:pointer], :int
-
# !
# @function EDTokenIsOpcode
# @param token The token to be queried.
# @result 1 if the token is opcode; 0 if not; -1 on error.
- #
+
# @method ed_token_is_opcode(token)
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_token_is_opcode, :EDTokenIsOpcode, [:pointer], :int
-
# !
# @function EDTokenIsLiteral
# @param token The token to be queried.
# @result 1 if the token is a numeric literal; 0 if not; -1 on error.
- #
+
# @method ed_token_is_literal(token)
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_token_is_literal, :EDTokenIsLiteral, [:pointer], :int
-
# !
# @function EDTokenIsRegister
# @param token The token to be queried.
# @result 1 if the token identifies a register; 0 if not; -1 on error.
- #
+
# @method ed_token_is_register(token)
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_token_is_register, :EDTokenIsRegister, [:pointer], :int
-
# !
# @function EDTokenIsNegativeLiteral
# @param token The token to be queried.
# @result 1 if the token is a negative signed literal; 0 if not; -1 on error.
- #
+
# @method ed_token_is_negative_literal(token)
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_token_is_negative_literal, :EDTokenIsNegativeLiteral, [:pointer], :int
-
# !
# @function EDLiteralTokenAbsoluteValue
# @param value A pointer whose target will be filled in with the absolute value
# of the literal.
# @param token The token to be queried.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_literal_token_absolute_value(value, token)
- # @param [FFI::Pointer(*Uint64T)] value
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(*Uint64T)] value
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_literal_token_absolute_value, :EDLiteralTokenAbsoluteValue, [:pointer, :pointer], :int
-
# !
# @function EDRegisterTokenValue
# @param registerID A pointer whose target will be filled in with the LLVM
# register identifier for the token.
# @param token The token to be queried.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_register_token_value(register_id, token)
- # @param [FFI::Pointer(*UInt)] register_id
- # @param [FFI::Pointer(EDTokenRef)] token
- # @return [Integer]
+ # @param [FFI::Pointer(*UInt)] register_id
+ # @param [FFI::Pointer(EDTokenRef)] token
+ # @return [Integer]
# @scope class
attach_function :ed_register_token_value, :EDRegisterTokenValue, [:pointer, :pointer], :int
-
# !
# @function EDNumOperands
# @param inst The instruction to be queried.
# @result The number of operands in the instruction, or -1 on error.
- #
+
# @method ed_num_operands(inst)
- # @param [FFI::Pointer(EDInstRef)] inst
- # @return [Integer]
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @return [Integer]
# @scope class
attach_function :ed_num_operands, :EDNumOperands, [:pointer], :int
-
# !
# @function EDGetOperand
# Retrieves an operand from an instruction. The operand is valid until the
@@ -414,76 +414,70 @@ def self.attach_function(name, *_)
# @param inst The instruction to be queried.
# @param index The index of the operand in the instruction.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_get_operand(operand, inst, index)
- # @param [FFI::Pointer(*EDOperandRef)] operand
- # @param [FFI::Pointer(EDInstRef)] inst
- # @param [Integer] index
- # @return [Integer]
+ # @param [FFI::Pointer(*EDOperandRef)] operand
+ # @param [FFI::Pointer(EDInstRef)] inst
+ # @param [Integer] index
+ # @return [Integer]
# @scope class
attach_function :ed_get_operand, :EDGetOperand, [:pointer, :pointer, :int], :int
-
# !
# @function EDOperandIsRegister
# @param operand The operand to be queried.
# @result 1 if the operand names a register; 0 if not; -1 on error.
- #
+
# @method ed_operand_is_register(operand)
- # @param [FFI::Pointer(EDOperandRef)] operand
- # @return [Integer]
+ # @param [FFI::Pointer(EDOperandRef)] operand
+ # @return [Integer]
# @scope class
attach_function :ed_operand_is_register, :EDOperandIsRegister, [:pointer], :int
-
# !
# @function EDOperandIsImmediate
# @param operand The operand to be queried.
# @result 1 if the operand specifies an immediate value; 0 if not; -1 on error.
- #
+
# @method ed_operand_is_immediate(operand)
- # @param [FFI::Pointer(EDOperandRef)] operand
- # @return [Integer]
+ # @param [FFI::Pointer(EDOperandRef)] operand
+ # @return [Integer]
# @scope class
attach_function :ed_operand_is_immediate, :EDOperandIsImmediate, [:pointer], :int
-
# !
# @function EDOperandIsMemory
# @param operand The operand to be queried.
# @result 1 if the operand specifies a location in memory; 0 if not; -1 on error.
- #
+
# @method ed_operand_is_memory(operand)
- # @param [FFI::Pointer(EDOperandRef)] operand
- # @return [Integer]
+ # @param [FFI::Pointer(EDOperandRef)] operand
+ # @return [Integer]
# @scope class
attach_function :ed_operand_is_memory, :EDOperandIsMemory, [:pointer], :int
-
# !
# @function EDRegisterOperandValue
# @param value A pointer whose target will be filled in with the LLVM register ID
# of the register named by the operand.
# @param operand The operand to be queried.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_register_operand_value(value, operand)
- # @param [FFI::Pointer(*UInt)] value
- # @param [FFI::Pointer(EDOperandRef)] operand
- # @return [Integer]
+ # @param [FFI::Pointer(*UInt)] value
+ # @param [FFI::Pointer(EDOperandRef)] operand
+ # @return [Integer]
# @scope class
attach_function :ed_register_operand_value, :EDRegisterOperandValue, [:pointer, :pointer], :int
-
# !
# @function EDImmediateOperandValue
# @param value A pointer whose target will be filled in with the value of the
# immediate.
# @param operand The operand to be queried.
# @result 0 on success; -1 otherwise.
- #
+
# @method ed_immediate_operand_value(value, operand)
- # @param [FFI::Pointer(*Uint64T)] value
- # @param [FFI::Pointer(EDOperandRef)] operand
- # @return [Integer]
+ # @param [FFI::Pointer(*Uint64T)] value
+ # @param [FFI::Pointer(EDOperandRef)] operand
+ # @return [Integer]
# @scope class
attach_function :ed_immediate_operand_value, :EDImmediateOperandValue, [:pointer, :pointer], :int
-
# !
# @function EDEvaluateOperand
# Evaluates an operand using a client-supplied register state accessor. Register
@@ -498,14 +492,13 @@ def self.attach_function(name, *_)
# state.
# @param arg An anonymous argument for client use.
# @result 0 if the operand could be evaluated; -1 otherwise.
- #
+
# @method ed_evaluate_operand(result, operand, reg_reader, arg)
- # @param [FFI::Pointer(*Uint64T)] result
- # @param [FFI::Pointer(EDOperandRef)] operand
- # @param [Proc(_callback_ed_register_reader_callback_)] reg_reader
- # @param [FFI::Pointer(*Void)] arg
- # @return [Integer]
- # @scope class
- attach_function :ed_evaluate_operand, :EDEvaluateOperand, [:pointer, :pointer, :ed_register_reader_callback, :pointer], :int
-
+ # @param [FFI::Pointer(*Uint64T)] result
+ # @param [FFI::Pointer(EDOperandRef)] operand
+ # @param [FFI::Pointer(EDRegisterReaderCallback)] reg_reader
+ # @param [FFI::Pointer(*Void)] arg
+ # @return [Integer]
+ # @scope class
+ attach_function :ed_evaluate_operand, :EDEvaluateOperand, [:pointer, :pointer, :pointer, :pointer], :int
end
diff --git a/test/output/llvm-c/ExecutionEngine.rb b/test/output/llvm-c/ExecutionEngine.rb
index 3126a8a..9243fcd 100644
--- a/test/output/llvm-c/ExecutionEngine.rb
+++ b/test/output/llvm-c/ExecutionEngine.rb
@@ -1,314 +1,285 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
- #
+
# @method link_in_jit()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :link_in_jit, :LLVMLinkInJIT, [], :void
-
# (Not documented)
- #
+
# @method link_in_interpreter()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :link_in_interpreter, :LLVMLinkInInterpreter, [], :void
-
# (Not documented)
class OpaqueGenericValue < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class OpaqueExecutionEngine < FFI::Struct
layout :dummy, :char
end
-
+
# ===-- Operations on generic values --------------------------------------===
- #
+
# @method create_generic_value_of_int(ty, n, is_signed)
- # @param [FFI::Pointer(TypeRef)] ty
- # @param [Integer] n
- # @param [Integer] is_signed
- # @return [OpaqueGenericValue]
+ # @param [FFI::Pointer(TypeRef)] ty
+ # @param [Integer] n
+ # @param [Integer] is_signed
+ # @return [OpaqueGenericValue]
# @scope class
attach_function :create_generic_value_of_int, :LLVMCreateGenericValueOfInt, [:pointer, :ulong_long, :int], OpaqueGenericValue
-
# (Not documented)
- #
+
# @method create_generic_value_of_pointer(p)
- # @param [FFI::Pointer(*Void)] p
- # @return [OpaqueGenericValue]
+ # @param [FFI::Pointer(*Void)] p
+ # @return [OpaqueGenericValue]
# @scope class
attach_function :create_generic_value_of_pointer, :LLVMCreateGenericValueOfPointer, [:pointer], OpaqueGenericValue
-
# (Not documented)
- #
+
# @method create_generic_value_of_float(ty, n)
- # @param [FFI::Pointer(TypeRef)] ty
- # @param [Float] n
- # @return [OpaqueGenericValue]
+ # @param [FFI::Pointer(TypeRef)] ty
+ # @param [Float] n
+ # @return [OpaqueGenericValue]
# @scope class
attach_function :create_generic_value_of_float, :LLVMCreateGenericValueOfFloat, [:pointer, :double], OpaqueGenericValue
-
# (Not documented)
- #
+
# @method generic_value_int_width(gen_val_ref)
- # @param [OpaqueGenericValue] gen_val_ref
- # @return [Integer]
+ # @param [OpaqueGenericValue] gen_val_ref
+ # @return [Integer]
# @scope class
attach_function :generic_value_int_width, :LLVMGenericValueIntWidth, [OpaqueGenericValue], :uint
-
# (Not documented)
- #
+
# @method generic_value_to_int(gen_val, is_signed)
- # @param [OpaqueGenericValue] gen_val
- # @param [Integer] is_signed
- # @return [Integer]
+ # @param [OpaqueGenericValue] gen_val
+ # @param [Integer] is_signed
+ # @return [Integer]
# @scope class
attach_function :generic_value_to_int, :LLVMGenericValueToInt, [OpaqueGenericValue, :int], :ulong_long
-
# (Not documented)
- #
+
# @method generic_value_to_pointer(gen_val)
- # @param [OpaqueGenericValue] gen_val
- # @return [FFI::Pointer(*Void)]
+ # @param [OpaqueGenericValue] gen_val
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :generic_value_to_pointer, :LLVMGenericValueToPointer, [OpaqueGenericValue], :pointer
-
# (Not documented)
- #
+
# @method generic_value_to_float(ty_ref, gen_val)
- # @param [FFI::Pointer(TypeRef)] ty_ref
- # @param [OpaqueGenericValue] gen_val
- # @return [Float]
+ # @param [FFI::Pointer(TypeRef)] ty_ref
+ # @param [OpaqueGenericValue] gen_val
+ # @return [Float]
# @scope class
attach_function :generic_value_to_float, :LLVMGenericValueToFloat, [:pointer, OpaqueGenericValue], :double
-
# (Not documented)
- #
+
# @method dispose_generic_value(gen_val)
- # @param [OpaqueGenericValue] gen_val
- # @return [nil]
+ # @param [OpaqueGenericValue] gen_val
+ # @return [nil]
# @scope class
attach_function :dispose_generic_value, :LLVMDisposeGenericValue, [OpaqueGenericValue], :void
-
# ===-- Operations on execution engines -----------------------------------===
- #
+
# @method create_execution_engine_for_module(out_ee, m, out_error)
- # @param [FFI::Pointer(*ExecutionEngineRef)] out_ee
- # @param [FFI::Pointer(ModuleRef)] m
- # @param [FFI::Pointer(**CharS)] out_error
- # @return [Integer]
+ # @param [FFI::Pointer(*ExecutionEngineRef)] out_ee
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @param [FFI::Pointer(**CharS)] out_error
+ # @return [Integer]
# @scope class
attach_function :create_execution_engine_for_module, :LLVMCreateExecutionEngineForModule, [:pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method create_interpreter_for_module(out_interp, m, out_error)
- # @param [FFI::Pointer(*ExecutionEngineRef)] out_interp
- # @param [FFI::Pointer(ModuleRef)] m
- # @param [FFI::Pointer(**CharS)] out_error
- # @return [Integer]
+ # @param [FFI::Pointer(*ExecutionEngineRef)] out_interp
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @param [FFI::Pointer(**CharS)] out_error
+ # @return [Integer]
# @scope class
attach_function :create_interpreter_for_module, :LLVMCreateInterpreterForModule, [:pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method create_jit_compiler_for_module(out_jit, m, opt_level, out_error)
- # @param [FFI::Pointer(*ExecutionEngineRef)] out_jit
- # @param [FFI::Pointer(ModuleRef)] m
- # @param [Integer] opt_level
- # @param [FFI::Pointer(**CharS)] out_error
- # @return [Integer]
+ # @param [FFI::Pointer(*ExecutionEngineRef)] out_jit
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @param [Integer] opt_level
+ # @param [FFI::Pointer(**CharS)] out_error
+ # @return [Integer]
# @scope class
attach_function :create_jit_compiler_for_module, :LLVMCreateJITCompilerForModule, [:pointer, :pointer, :uint, :pointer], :int
-
# Deprecated: Use LLVMCreateExecutionEngineForModule instead.
- #
+
# @method create_execution_engine(out_ee, mp, out_error)
- # @param [FFI::Pointer(*ExecutionEngineRef)] out_ee
- # @param [FFI::Pointer(ModuleProviderRef)] mp
- # @param [FFI::Pointer(**CharS)] out_error
- # @return [Integer]
+ # @param [FFI::Pointer(*ExecutionEngineRef)] out_ee
+ # @param [FFI::Pointer(ModuleProviderRef)] mp
+ # @param [FFI::Pointer(**CharS)] out_error
+ # @return [Integer]
# @scope class
attach_function :create_execution_engine, :LLVMCreateExecutionEngine, [:pointer, :pointer, :pointer], :int
-
# Deprecated: Use LLVMCreateInterpreterForModule instead.
- #
+
# @method create_interpreter(out_interp, mp, out_error)
- # @param [FFI::Pointer(*ExecutionEngineRef)] out_interp
- # @param [FFI::Pointer(ModuleProviderRef)] mp
- # @param [FFI::Pointer(**CharS)] out_error
- # @return [Integer]
+ # @param [FFI::Pointer(*ExecutionEngineRef)] out_interp
+ # @param [FFI::Pointer(ModuleProviderRef)] mp
+ # @param [FFI::Pointer(**CharS)] out_error
+ # @return [Integer]
# @scope class
attach_function :create_interpreter, :LLVMCreateInterpreter, [:pointer, :pointer, :pointer], :int
-
# Deprecated: Use LLVMCreateJITCompilerForModule instead.
- #
+
# @method create_jit_compiler(out_jit, mp, opt_level, out_error)
- # @param [FFI::Pointer(*ExecutionEngineRef)] out_jit
- # @param [FFI::Pointer(ModuleProviderRef)] mp
- # @param [Integer] opt_level
- # @param [FFI::Pointer(**CharS)] out_error
- # @return [Integer]
+ # @param [FFI::Pointer(*ExecutionEngineRef)] out_jit
+ # @param [FFI::Pointer(ModuleProviderRef)] mp
+ # @param [Integer] opt_level
+ # @param [FFI::Pointer(**CharS)] out_error
+ # @return [Integer]
# @scope class
attach_function :create_jit_compiler, :LLVMCreateJITCompiler, [:pointer, :pointer, :uint, :pointer], :int
-
# (Not documented)
- #
+
# @method dispose_execution_engine(ee)
- # @param [OpaqueExecutionEngine] ee
- # @return [nil]
+ # @param [OpaqueExecutionEngine] ee
+ # @return [nil]
# @scope class
attach_function :dispose_execution_engine, :LLVMDisposeExecutionEngine, [OpaqueExecutionEngine], :void
-
# (Not documented)
- #
+
# @method run_static_constructors(ee)
- # @param [OpaqueExecutionEngine] ee
- # @return [nil]
+ # @param [OpaqueExecutionEngine] ee
+ # @return [nil]
# @scope class
attach_function :run_static_constructors, :LLVMRunStaticConstructors, [OpaqueExecutionEngine], :void
-
# (Not documented)
- #
+
# @method run_static_destructors(ee)
- # @param [OpaqueExecutionEngine] ee
- # @return [nil]
+ # @param [OpaqueExecutionEngine] ee
+ # @return [nil]
# @scope class
attach_function :run_static_destructors, :LLVMRunStaticDestructors, [OpaqueExecutionEngine], :void
-
@blocking = true
# (Not documented)
- #
+
# @method run_function_as_main(ee, f, arg_c, arg_v, env_p)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ValueRef)] f
- # @param [Integer] arg_c
- # @param [FFI::Pointer(**CharS)] arg_v
- # @param [FFI::Pointer(**CharS)] env_p
- # @return [Integer]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ValueRef)] f
+ # @param [Integer] arg_c
+ # @param [FFI::Pointer(**CharS)] arg_v
+ # @param [FFI::Pointer(**CharS)] env_p
+ # @return [Integer]
# @scope class
attach_function :run_function_as_main, :LLVMRunFunctionAsMain, [OpaqueExecutionEngine, :pointer, :uint, :pointer, :pointer], :int
-
@blocking = true
# (Not documented)
- #
+
# @method run_function(ee, f, num_args, args)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ValueRef)] f
- # @param [Integer] num_args
- # @param [FFI::Pointer(*GenericValueRef)] args
- # @return [OpaqueGenericValue]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ValueRef)] f
+ # @param [Integer] num_args
+ # @param [FFI::Pointer(*GenericValueRef)] args
+ # @return [OpaqueGenericValue]
# @scope class
attach_function :run_function, :LLVMRunFunction, [OpaqueExecutionEngine, :pointer, :uint, :pointer], OpaqueGenericValue
-
# (Not documented)
- #
+
# @method free_machine_code_for_function(ee, f)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ValueRef)] f
- # @return [nil]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ValueRef)] f
+ # @return [nil]
# @scope class
attach_function :free_machine_code_for_function, :LLVMFreeMachineCodeForFunction, [OpaqueExecutionEngine, :pointer], :void
-
# (Not documented)
- #
+
# @method add_module(ee, m)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ModuleRef)] m
- # @return [nil]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @return [nil]
# @scope class
attach_function :add_module, :LLVMAddModule, [OpaqueExecutionEngine, :pointer], :void
-
# Deprecated: Use LLVMAddModule instead.
- #
+
# @method add_module_provider(ee, mp)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ModuleProviderRef)] mp
- # @return [nil]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ModuleProviderRef)] mp
+ # @return [nil]
# @scope class
attach_function :add_module_provider, :LLVMAddModuleProvider, [OpaqueExecutionEngine, :pointer], :void
-
# (Not documented)
- #
+
# @method remove_module(ee, m, out_mod, out_error)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ModuleRef)] m
- # @param [FFI::Pointer(*ModuleRef)] out_mod
- # @param [FFI::Pointer(**CharS)] out_error
- # @return [Integer]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ModuleRef)] m
+ # @param [FFI::Pointer(*ModuleRef)] out_mod
+ # @param [FFI::Pointer(**CharS)] out_error
+ # @return [Integer]
# @scope class
attach_function :remove_module, :LLVMRemoveModule, [OpaqueExecutionEngine, :pointer, :pointer, :pointer], :int
-
# Deprecated: Use LLVMRemoveModule instead.
- #
+
# @method remove_module_provider(ee, mp, out_mod, out_error)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ModuleProviderRef)] mp
- # @param [FFI::Pointer(*ModuleRef)] out_mod
- # @param [FFI::Pointer(**CharS)] out_error
- # @return [Integer]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ModuleProviderRef)] mp
+ # @param [FFI::Pointer(*ModuleRef)] out_mod
+ # @param [FFI::Pointer(**CharS)] out_error
+ # @return [Integer]
# @scope class
attach_function :remove_module_provider, :LLVMRemoveModuleProvider, [OpaqueExecutionEngine, :pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method find_function(ee, name, out_fn)
- # @param [OpaqueExecutionEngine] ee
- # @param [String] name
- # @param [FFI::Pointer(*ValueRef)] out_fn
- # @return [Integer]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [String] name
+ # @param [FFI::Pointer(*ValueRef)] out_fn
+ # @return [Integer]
# @scope class
attach_function :find_function, :LLVMFindFunction, [OpaqueExecutionEngine, :string, :pointer], :int
-
# (Not documented)
- #
+
# @method recompile_and_relink_function(ee, fn)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ValueRef)] fn
- # @return [FFI::Pointer(*Void)]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ValueRef)] fn
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :recompile_and_relink_function, :LLVMRecompileAndRelinkFunction, [OpaqueExecutionEngine, :pointer], :pointer
-
# (Not documented)
- #
+
# @method get_execution_engine_target_data(ee)
- # @param [OpaqueExecutionEngine] ee
- # @return [FFI::Pointer(TargetDataRef)]
+ # @param [OpaqueExecutionEngine] ee
+ # @return [FFI::Pointer(TargetDataRef)]
# @scope class
attach_function :get_execution_engine_target_data, :LLVMGetExecutionEngineTargetData, [OpaqueExecutionEngine], :pointer
-
# (Not documented)
- #
+
# @method add_global_mapping(ee, global, addr)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ValueRef)] global
- # @param [FFI::Pointer(*Void)] addr
- # @return [nil]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ValueRef)] global
+ # @param [FFI::Pointer(*Void)] addr
+ # @return [nil]
# @scope class
attach_function :add_global_mapping, :LLVMAddGlobalMapping, [OpaqueExecutionEngine, :pointer, :pointer], :void
-
# (Not documented)
- #
+
# @method get_pointer_to_global(ee, global)
- # @param [OpaqueExecutionEngine] ee
- # @param [FFI::Pointer(ValueRef)] global
- # @return [FFI::Pointer(*Void)]
+ # @param [OpaqueExecutionEngine] ee
+ # @param [FFI::Pointer(ValueRef)] global
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :get_pointer_to_global, :LLVMGetPointerToGlobal, [OpaqueExecutionEngine, :pointer], :pointer
-
end
diff --git a/test/output/llvm-c/Initialization.rb b/test/output/llvm-c/Initialization.rb
index 0dfebca..4893cee 100644
--- a/test/output/llvm-c/Initialization.rb
+++ b/test/output/llvm-c/Initialization.rb
@@ -1,95 +1,87 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
- #
+
# @method initialize_core(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_core, :LLVMInitializeCore, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_transform_utils(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_transform_utils, :LLVMInitializeTransformUtils, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_scalar_opts(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_scalar_opts, :LLVMInitializeScalarOpts, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_inst_combine(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_inst_combine, :LLVMInitializeInstCombine, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_ipo(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_ipo, :LLVMInitializeIPO, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_instrumentation(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_instrumentation, :LLVMInitializeInstrumentation, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_analysis(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_analysis, :LLVMInitializeAnalysis, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_ipa(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_ipa, :LLVMInitializeIPA, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_code_gen(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_code_gen, :LLVMInitializeCodeGen, [:pointer], :void
-
# (Not documented)
- #
+
# @method initialize_target(r)
- # @param [FFI::Pointer(PassRegistryRef)] r
- # @return [nil]
+ # @param [FFI::Pointer(PassRegistryRef)] r
+ # @return [nil]
# @scope class
attach_function :initialize_target, :LLVMInitializeTarget, [:pointer], :void
-
end
diff --git a/test/output/llvm-c/LinkTimeOptimizer.rb b/test/output/llvm-c/LinkTimeOptimizer.rb
index af2b83a..361fb3f 100644
--- a/test/output/llvm-c/LinkTimeOptimizer.rb
+++ b/test/output/llvm-c/LinkTimeOptimizer.rb
@@ -1,43 +1,45 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# This should map exactly onto the C++ enumerator LTOStatus.
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:llvm_lto_status).
- #
+
# === Options:
# :unknown ::
- #
+
# :opt_success ::
- #
+
# :read_success ::
- #
+
# :read_failure ::
- #
+
# :write_failure ::
- #
+
# :no_target ::
- #
+
# :no_work ::
- #
+
# :module_merge_failure ::
- #
+
# :asm_failure ::
- #
+
# :null_object ::
# Added C-specific error codes
- #
+
# @method _enum_llvm_lto_status_
# @return [Symbol]
# @scope class
@@ -53,38 +55,34 @@ def self.attach_function(name, *_)
:asm_failure, 8,
:null_object, 9
]
-
+
# extern "C" helps, because dlopen() interface uses name to find the symbol.
- #
+
# @method llvm_create_optimizer()
- # @return [FFI::Pointer(LlvmLtoT)]
+ # @return [FFI::Pointer(LlvmLtoT)]
# @scope class
attach_function :llvm_create_optimizer, :llvm_create_optimizer, [], :pointer
-
# (Not documented)
- #
+
# @method llvm_destroy_optimizer(lto)
- # @param [FFI::Pointer(LlvmLtoT)] lto
- # @return [nil]
+ # @param [FFI::Pointer(LlvmLtoT)] lto
+ # @return [nil]
# @scope class
attach_function :llvm_destroy_optimizer, :llvm_destroy_optimizer, [:pointer], :void
-
# (Not documented)
- #
+
# @method llvm_read_object_file(lto, input_filename)
- # @param [FFI::Pointer(LlvmLtoT)] lto
- # @param [String] input_filename
- # @return [Symbol from _enum_llvm_lto_status_]
+ # @param [FFI::Pointer(LlvmLtoT)] lto
+ # @param [String] input_filename
+ # @return [Symbol from _enum_llvm_lto_status_]
# @scope class
attach_function :llvm_read_object_file, :llvm_read_object_file, [:pointer, :string], :llvm_lto_status
-
# (Not documented)
- #
+
# @method llvm_optimize_modules(lto, output_filename)
- # @param [FFI::Pointer(LlvmLtoT)] lto
- # @param [String] output_filename
- # @return [Symbol from _enum_llvm_lto_status_]
+ # @param [FFI::Pointer(LlvmLtoT)] lto
+ # @param [String] output_filename
+ # @return [Symbol from _enum_llvm_lto_status_]
# @scope class
attach_function :llvm_optimize_modules, :llvm_optimize_modules, [:pointer, :string], :llvm_lto_status
-
end
diff --git a/test/output/llvm-c/Object.rb b/test/output/llvm-c/Object.rb
index 072819c..81be50f 100644
--- a/test/output/llvm-c/Object.rb
+++ b/test/output/llvm-c/Object.rb
@@ -1,98 +1,91 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class OpaqueObjectFile < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class OpaqueSectionIterator < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
- #
+
# @method create_object_file(mem_buf)
- # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
- # @return [OpaqueObjectFile]
+ # @param [FFI::Pointer(MemoryBufferRef)] mem_buf
+ # @return [OpaqueObjectFile]
# @scope class
attach_function :create_object_file, :LLVMCreateObjectFile, [:pointer], OpaqueObjectFile
-
# (Not documented)
- #
+
# @method dispose_object_file(object_file)
- # @param [OpaqueObjectFile] object_file
- # @return [nil]
+ # @param [OpaqueObjectFile] object_file
+ # @return [nil]
# @scope class
attach_function :dispose_object_file, :LLVMDisposeObjectFile, [OpaqueObjectFile], :void
-
# (Not documented)
- #
+
# @method get_sections(object_file)
- # @param [OpaqueObjectFile] object_file
- # @return [OpaqueSectionIterator]
+ # @param [OpaqueObjectFile] object_file
+ # @return [OpaqueSectionIterator]
# @scope class
attach_function :get_sections, :LLVMGetSections, [OpaqueObjectFile], OpaqueSectionIterator
-
# (Not documented)
- #
+
# @method dispose_section_iterator(si)
- # @param [OpaqueSectionIterator] si
- # @return [nil]
+ # @param [OpaqueSectionIterator] si
+ # @return [nil]
# @scope class
attach_function :dispose_section_iterator, :LLVMDisposeSectionIterator, [OpaqueSectionIterator], :void
-
# (Not documented)
- #
+
# @method is_section_iterator_at_end(object_file, si)
- # @param [OpaqueObjectFile] object_file
- # @param [OpaqueSectionIterator] si
- # @return [Integer]
+ # @param [OpaqueObjectFile] object_file
+ # @param [OpaqueSectionIterator] si
+ # @return [Integer]
# @scope class
attach_function :is_section_iterator_at_end, :LLVMIsSectionIteratorAtEnd, [OpaqueObjectFile, OpaqueSectionIterator], :int
-
# (Not documented)
- #
+
# @method move_to_next_section(si)
- # @param [OpaqueSectionIterator] si
- # @return [nil]
+ # @param [OpaqueSectionIterator] si
+ # @return [nil]
# @scope class
attach_function :move_to_next_section, :LLVMMoveToNextSection, [OpaqueSectionIterator], :void
-
# (Not documented)
- #
+
# @method get_section_name(si)
- # @param [OpaqueSectionIterator] si
- # @return [String]
+ # @param [OpaqueSectionIterator] si
+ # @return [String]
# @scope class
attach_function :get_section_name, :LLVMGetSectionName, [OpaqueSectionIterator], :string
-
# (Not documented)
- #
+
# @method get_section_size(si)
- # @param [OpaqueSectionIterator] si
- # @return [Integer]
+ # @param [OpaqueSectionIterator] si
+ # @return [Integer]
# @scope class
- attach_function :get_section_size, :LLVMGetSectionSize, [OpaqueSectionIterator], :ulong
-
+ attach_function :get_section_size, :LLVMGetSectionSize, [OpaqueSectionIterator], :ulong_long
# (Not documented)
- #
+
# @method get_section_contents(si)
- # @param [OpaqueSectionIterator] si
- # @return [String]
+ # @param [OpaqueSectionIterator] si
+ # @return [String]
# @scope class
attach_function :get_section_contents, :LLVMGetSectionContents, [OpaqueSectionIterator], :string
-
end
diff --git a/test/output/llvm-c/Target.rb b/test/output/llvm-c/Target.rb
index 5cd7c88..a7360e6 100644
--- a/test/output/llvm-c/Target.rb
+++ b/test/output/llvm-c/Target.rb
@@ -1,27 +1,29 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:byte_ordering).
- #
+
# === Options:
# :big_endian ::
- #
+
# :little_endian ::
- #
- #
+
+
# @method _enum_byte_ordering_
# @return [Symbol]
# @scope class
@@ -29,217 +31,197 @@ def self.attach_function(name, *_)
:big_endian, 0,
:little_endian, 1
]
-
+
# (Not documented)
class OpaqueTargetData < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class OpaqueTargetLibraryInfotData < FFI::Struct
layout :dummy, :char
end
-
+
# (Not documented)
class StructLayout < FFI::Struct
layout :dummy, :char
end
-
+
# LLVMInitializeAllTargetInfos - The main program should call this function if
# it wants access to all available targets that LLVM is configured to
# support.
- #
+
# @method initialize_all_target_infos()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :initialize_all_target_infos, :LLVMInitializeAllTargetInfos, [], :void
-
# LLVMInitializeAllTargets - The main program should call this function if it
# wants to link in all available targets that LLVM is configured to
# support.
- #
+
# @method initialize_all_targets()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :initialize_all_targets, :LLVMInitializeAllTargets, [], :void
-
# LLVMInitializeNativeTarget - The main program should call this function to
# initialize the native target corresponding to the host. This is useful
# for JIT applications to ensure that the target gets linked in correctly.
- #
+
# @method initialize_native_target()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :initialize_native_target, :LLVMInitializeNativeTarget, [], :int
-
# Creates target data from a target layout string.
# See the constructor llvm::TargetData::TargetData.
- #
+
# @method create_target_data(string_rep)
- # @param [String] string_rep
- # @return [OpaqueTargetData]
+ # @param [String] string_rep
+ # @return [OpaqueTargetData]
# @scope class
attach_function :create_target_data, :LLVMCreateTargetData, [:string], OpaqueTargetData
-
# Adds target data information to a pass manager. This does not take ownership
# of the target data.
# See the method llvm::PassManagerBase::add.
- #
+
# @method add_target_data(opaque_target_data, pass_manager_ref)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref
- # @return [nil]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref
+ # @return [nil]
# @scope class
attach_function :add_target_data, :LLVMAddTargetData, [OpaqueTargetData, :pointer], :void
-
# Adds target library information to a pass manager. This does not take
# ownership of the target library info.
# See the method llvm::PassManagerBase::add.
- #
+
# @method add_target_library_info(opaque_target_library_infot_data, pass_manager_ref)
- # @param [OpaqueTargetLibraryInfotData] opaque_target_library_infot_data
- # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref
- # @return [nil]
+ # @param [OpaqueTargetLibraryInfotData] opaque_target_library_infot_data
+ # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref
+ # @return [nil]
# @scope class
attach_function :add_target_library_info, :LLVMAddTargetLibraryInfo, [OpaqueTargetLibraryInfotData, :pointer], :void
-
# Converts target data to a target layout string. The string must be disposed
# with LLVMDisposeMessage.
# See the constructor llvm::TargetData::TargetData.
- #
+
# @method copy_string_rep_of_target_data(opaque_target_data)
- # @param [OpaqueTargetData] opaque_target_data
- # @return [String]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @return [String]
# @scope class
attach_function :copy_string_rep_of_target_data, :LLVMCopyStringRepOfTargetData, [OpaqueTargetData], :string
-
# Returns the byte order of a target, either LLVMBigEndian or
# LLVMLittleEndian.
# See the method llvm::TargetData::isLittleEndian.
- #
+
# @method byte_order(opaque_target_data)
- # @param [OpaqueTargetData] opaque_target_data
- # @return [Symbol from _enum_byte_ordering_]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @return [Symbol from _enum_byte_ordering_]
# @scope class
attach_function :byte_order, :LLVMByteOrder, [OpaqueTargetData], :byte_ordering
-
# Returns the pointer size in bytes for a target.
# See the method llvm::TargetData::getPointerSize.
- #
+
# @method pointer_size(opaque_target_data)
- # @param [OpaqueTargetData] opaque_target_data
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @return [Integer]
# @scope class
attach_function :pointer_size, :LLVMPointerSize, [OpaqueTargetData], :uint
-
# Returns the integer type that is the same size as a pointer on a target.
# See the method llvm::TargetData::getIntPtrType.
- #
+
# @method int_ptr_type(opaque_target_data)
- # @param [OpaqueTargetData] opaque_target_data
- # @return [FFI::Pointer(TypeRef)]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @return [FFI::Pointer(TypeRef)]
# @scope class
attach_function :int_ptr_type, :LLVMIntPtrType, [OpaqueTargetData], :pointer
-
# Computes the size of a type in bytes for a target.
# See the method llvm::TargetData::getTypeSizeInBits.
- #
+
# @method size_of_type_in_bits(opaque_target_data, type_ref)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(TypeRef)] type_ref
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(TypeRef)] type_ref
+ # @return [Integer]
# @scope class
attach_function :size_of_type_in_bits, :LLVMSizeOfTypeInBits, [OpaqueTargetData, :pointer], :ulong_long
-
# Computes the storage size of a type in bytes for a target.
# See the method llvm::TargetData::getTypeStoreSize.
- #
+
# @method store_size_of_type(opaque_target_data, type_ref)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(TypeRef)] type_ref
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(TypeRef)] type_ref
+ # @return [Integer]
# @scope class
attach_function :store_size_of_type, :LLVMStoreSizeOfType, [OpaqueTargetData, :pointer], :ulong_long
-
# Computes the ABI size of a type in bytes for a target.
# See the method llvm::TargetData::getTypeAllocSize.
- #
+
# @method abi_size_of_type(opaque_target_data, type_ref)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(TypeRef)] type_ref
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(TypeRef)] type_ref
+ # @return [Integer]
# @scope class
attach_function :abi_size_of_type, :LLVMABISizeOfType, [OpaqueTargetData, :pointer], :ulong_long
-
# Computes the ABI alignment of a type in bytes for a target.
# See the method llvm::TargetData::getTypeABISize.
- #
+
# @method abi_alignment_of_type(opaque_target_data, type_ref)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(TypeRef)] type_ref
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(TypeRef)] type_ref
+ # @return [Integer]
# @scope class
attach_function :abi_alignment_of_type, :LLVMABIAlignmentOfType, [OpaqueTargetData, :pointer], :uint
-
# Computes the call frame alignment of a type in bytes for a target.
# See the method llvm::TargetData::getTypeABISize.
- #
+
# @method call_frame_alignment_of_type(opaque_target_data, type_ref)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(TypeRef)] type_ref
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(TypeRef)] type_ref
+ # @return [Integer]
# @scope class
attach_function :call_frame_alignment_of_type, :LLVMCallFrameAlignmentOfType, [OpaqueTargetData, :pointer], :uint
-
# Computes the preferred alignment of a type in bytes for a target.
# See the method llvm::TargetData::getTypeABISize.
- #
+
# @method preferred_alignment_of_type(opaque_target_data, type_ref)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(TypeRef)] type_ref
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(TypeRef)] type_ref
+ # @return [Integer]
# @scope class
attach_function :preferred_alignment_of_type, :LLVMPreferredAlignmentOfType, [OpaqueTargetData, :pointer], :uint
-
# Computes the preferred alignment of a global variable in bytes for a target.
# See the method llvm::TargetData::getPreferredAlignment.
- #
+
# @method preferred_alignment_of_global(opaque_target_data, global_var)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(ValueRef)] global_var
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(ValueRef)] global_var
+ # @return [Integer]
# @scope class
attach_function :preferred_alignment_of_global, :LLVMPreferredAlignmentOfGlobal, [OpaqueTargetData, :pointer], :uint
-
# Computes the structure element that contains the byte offset for a target.
# See the method llvm::StructLayout::getElementContainingOffset.
- #
+
# @method element_at_offset(opaque_target_data, struct_ty, offset)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(TypeRef)] struct_ty
- # @param [Integer] offset
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(TypeRef)] struct_ty
+ # @param [Integer] offset
+ # @return [Integer]
# @scope class
attach_function :element_at_offset, :LLVMElementAtOffset, [OpaqueTargetData, :pointer, :ulong_long], :uint
-
# Computes the byte offset of the indexed struct element for a target.
# See the method llvm::StructLayout::getElementContainingOffset.
- #
+
# @method offset_of_element(opaque_target_data, struct_ty, element)
- # @param [OpaqueTargetData] opaque_target_data
- # @param [FFI::Pointer(TypeRef)] struct_ty
- # @param [Integer] element
- # @return [Integer]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @param [FFI::Pointer(TypeRef)] struct_ty
+ # @param [Integer] element
+ # @return [Integer]
# @scope class
attach_function :offset_of_element, :LLVMOffsetOfElement, [OpaqueTargetData, :pointer, :uint], :ulong_long
-
# Deallocates a TargetData.
# See the destructor llvm::TargetData::~TargetData.
- #
+
# @method dispose_target_data(opaque_target_data)
- # @param [OpaqueTargetData] opaque_target_data
- # @return [nil]
+ # @param [OpaqueTargetData] opaque_target_data
+ # @return [nil]
# @scope class
attach_function :dispose_target_data, :LLVMDisposeTargetData, [OpaqueTargetData], :void
-
end
diff --git a/test/output/llvm-c/Transforms/IPO.rb b/test/output/llvm-c/Transforms/IPO.rb
index 22bc8d0..fc4e768 100644
--- a/test/output/llvm-c/Transforms/IPO.rb
+++ b/test/output/llvm-c/Transforms/IPO.rb
@@ -1,128 +1,116 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# See llvm::createArgumentPromotionPass function.
- #
+
# @method add_argument_promotion_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_argument_promotion_pass, :LLVMAddArgumentPromotionPass, [:pointer], :void
-
# See llvm::createConstantMergePass function.
- #
+
# @method add_constant_merge_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_constant_merge_pass, :LLVMAddConstantMergePass, [:pointer], :void
-
# See llvm::createDeadArgEliminationPass function.
- #
+
# @method add_dead_arg_elimination_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_dead_arg_elimination_pass, :LLVMAddDeadArgEliminationPass, [:pointer], :void
-
# See llvm::createFunctionAttrsPass function.
- #
+
# @method add_function_attrs_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_function_attrs_pass, :LLVMAddFunctionAttrsPass, [:pointer], :void
-
# See llvm::createFunctionInliningPass function.
- #
+
# @method add_function_inlining_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_function_inlining_pass, :LLVMAddFunctionInliningPass, [:pointer], :void
-
# See llvm::createAlwaysInlinerPass function.
- #
+
# @method add_always_inliner_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_always_inliner_pass, :LLVMAddAlwaysInlinerPass, [:pointer], :void
-
# See llvm::createGlobalDCEPass function.
- #
+
# @method add_global_dce_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_global_dce_pass, :LLVMAddGlobalDCEPass, [:pointer], :void
-
# See llvm::createGlobalOptimizerPass function.
- #
+
# @method add_global_optimizer_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_global_optimizer_pass, :LLVMAddGlobalOptimizerPass, [:pointer], :void
-
# See llvm::createIPConstantPropagationPass function.
- #
+
# @method add_ip_constant_propagation_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_ip_constant_propagation_pass, :LLVMAddIPConstantPropagationPass, [:pointer], :void
-
# See llvm::createPruneEHPass function.
- #
+
# @method add_prune_eh_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_prune_eh_pass, :LLVMAddPruneEHPass, [:pointer], :void
-
# See llvm::createIPSCCPPass function.
- #
+
# @method add_ipsccp_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_ipsccp_pass, :LLVMAddIPSCCPPass, [:pointer], :void
-
# See llvm::createInternalizePass function.
- #
+
# @method add_internalize_pass(pass_manager_ref, all_but_main)
- # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref
- # @param [Integer] all_but_main
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref
+ # @param [Integer] all_but_main
+ # @return [nil]
# @scope class
attach_function :add_internalize_pass, :LLVMAddInternalizePass, [:pointer, :uint], :void
-
# See llvm::createStripDeadPrototypesPass function.
- #
+
# @method add_strip_dead_prototypes_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_strip_dead_prototypes_pass, :LLVMAddStripDeadPrototypesPass, [:pointer], :void
-
# See llvm::createStripSymbolsPass function.
- #
+
# @method add_strip_symbols_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_strip_symbols_pass, :LLVMAddStripSymbolsPass, [:pointer], :void
-
end
diff --git a/test/output/llvm-c/Transforms/PassManagerBuilder.rb b/test/output/llvm-c/Transforms/PassManagerBuilder.rb
index d2d593d..cd73474 100644
--- a/test/output/llvm-c/Transforms/PassManagerBuilder.rb
+++ b/test/output/llvm-c/Transforms/PassManagerBuilder.rb
@@ -1,118 +1,109 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# (Not documented)
class OpaquePassManagerBuilder < FFI::Struct
layout :dummy, :char
end
-
+
# See llvm::PassManagerBuilder.
- #
+
# @method pass_manager_builder_create()
- # @return [OpaquePassManagerBuilder]
+ # @return [OpaquePassManagerBuilder]
# @scope class
attach_function :pass_manager_builder_create, :LLVMPassManagerBuilderCreate, [], OpaquePassManagerBuilder
-
# (Not documented)
- #
+
# @method pass_manager_builder_dispose(pmb)
- # @param [OpaquePassManagerBuilder] pmb
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_dispose, :LLVMPassManagerBuilderDispose, [OpaquePassManagerBuilder], :void
-
# See llvm::PassManagerBuilder::OptLevel.
- #
+
# @method pass_manager_builder_set_opt_level(pmb, opt_level)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [Integer] opt_level
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [Integer] opt_level
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_set_opt_level, :LLVMPassManagerBuilderSetOptLevel, [OpaquePassManagerBuilder, :uint], :void
-
# See llvm::PassManagerBuilder::SizeLevel.
- #
+
# @method pass_manager_builder_set_size_level(pmb, size_level)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [Integer] size_level
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [Integer] size_level
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_set_size_level, :LLVMPassManagerBuilderSetSizeLevel, [OpaquePassManagerBuilder, :uint], :void
-
# See llvm::PassManagerBuilder::DisableUnitAtATime.
- #
+
# @method pass_manager_builder_set_disable_unit_at_a_time(pmb, value)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [Integer] value
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [Integer] value
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_set_disable_unit_at_a_time, :LLVMPassManagerBuilderSetDisableUnitAtATime, [OpaquePassManagerBuilder, :int], :void
-
# See llvm::PassManagerBuilder::DisableUnrollLoops.
- #
+
# @method pass_manager_builder_set_disable_unroll_loops(pmb, value)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [Integer] value
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [Integer] value
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_set_disable_unroll_loops, :LLVMPassManagerBuilderSetDisableUnrollLoops, [OpaquePassManagerBuilder, :int], :void
-
# See llvm::PassManagerBuilder::DisableSimplifyLibCalls
- #
+
# @method pass_manager_builder_set_disable_simplify_lib_calls(pmb, value)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [Integer] value
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [Integer] value
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_set_disable_simplify_lib_calls, :LLVMPassManagerBuilderSetDisableSimplifyLibCalls, [OpaquePassManagerBuilder, :int], :void
-
# See llvm::PassManagerBuilder::Inliner.
- #
+
# @method pass_manager_builder_use_inliner_with_threshold(pmb, threshold)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [Integer] threshold
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [Integer] threshold
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_use_inliner_with_threshold, :LLVMPassManagerBuilderUseInlinerWithThreshold, [OpaquePassManagerBuilder, :uint], :void
-
# See llvm::PassManagerBuilder::populateFunctionPassManager.
- #
+
# @method pass_manager_builder_populate_function_pass_manager(pmb, pm)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_populate_function_pass_manager, :LLVMPassManagerBuilderPopulateFunctionPassManager, [OpaquePassManagerBuilder, :pointer], :void
-
# See llvm::PassManagerBuilder::populateModulePassManager.
- #
+
# @method pass_manager_builder_populate_module_pass_manager(pmb, pm)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_populate_module_pass_manager, :LLVMPassManagerBuilderPopulateModulePassManager, [OpaquePassManagerBuilder, :pointer], :void
-
# See llvm::PassManagerBuilder::populateLTOPassManager.
- #
+
# @method pass_manager_builder_populate_lto_pass_manager(pmb, pm, internalize, run_inliner)
- # @param [OpaquePassManagerBuilder] pmb
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @param [Integer] internalize
- # @param [Integer] run_inliner
- # @return [nil]
+ # @param [OpaquePassManagerBuilder] pmb
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @param [Integer] internalize
+ # @param [Integer] run_inliner
+ # @return [nil]
# @scope class
attach_function :pass_manager_builder_populate_lto_pass_manager, :LLVMPassManagerBuilderPopulateLTOPassManager, [OpaquePassManagerBuilder, :pointer, :int, :int], :void
-
end
diff --git a/test/output/llvm-c/Transforms/Scalar.rb b/test/output/llvm-c/Transforms/Scalar.rb
index eb95e52..21e9429 100644
--- a/test/output/llvm-c/Transforms/Scalar.rb
+++ b/test/output/llvm-c/Transforms/Scalar.rb
@@ -1,256 +1,228 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
# See llvm::createAggressiveDCEPass function.
- #
+
# @method add_aggressive_dce_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_aggressive_dce_pass, :LLVMAddAggressiveDCEPass, [:pointer], :void
-
# See llvm::createCFGSimplificationPass function.
- #
+
# @method add_cfg_simplification_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_cfg_simplification_pass, :LLVMAddCFGSimplificationPass, [:pointer], :void
-
# See llvm::createDeadStoreEliminationPass function.
- #
+
# @method add_dead_store_elimination_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_dead_store_elimination_pass, :LLVMAddDeadStoreEliminationPass, [:pointer], :void
-
# See llvm::createGVNPass function.
- #
+
# @method add_gvn_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_gvn_pass, :LLVMAddGVNPass, [:pointer], :void
-
# See llvm::createIndVarSimplifyPass function.
- #
+
# @method add_ind_var_simplify_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_ind_var_simplify_pass, :LLVMAddIndVarSimplifyPass, [:pointer], :void
-
# See llvm::createInstructionCombiningPass function.
- #
+
# @method add_instruction_combining_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_instruction_combining_pass, :LLVMAddInstructionCombiningPass, [:pointer], :void
-
# See llvm::createJumpThreadingPass function.
- #
+
# @method add_jump_threading_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_jump_threading_pass, :LLVMAddJumpThreadingPass, [:pointer], :void
-
# See llvm::createLICMPass function.
- #
+
# @method add_licm_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_licm_pass, :LLVMAddLICMPass, [:pointer], :void
-
# See llvm::createLoopDeletionPass function.
- #
+
# @method add_loop_deletion_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_loop_deletion_pass, :LLVMAddLoopDeletionPass, [:pointer], :void
-
# See llvm::createLoopIdiomPass function
- #
+
# @method add_loop_idiom_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_loop_idiom_pass, :LLVMAddLoopIdiomPass, [:pointer], :void
-
# See llvm::createLoopRotatePass function.
- #
+
# @method add_loop_rotate_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_loop_rotate_pass, :LLVMAddLoopRotatePass, [:pointer], :void
-
# See llvm::createLoopUnrollPass function.
- #
+
# @method add_loop_unroll_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_loop_unroll_pass, :LLVMAddLoopUnrollPass, [:pointer], :void
-
# See llvm::createLoopUnswitchPass function.
- #
+
# @method add_loop_unswitch_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_loop_unswitch_pass, :LLVMAddLoopUnswitchPass, [:pointer], :void
-
# See llvm::createMemCpyOptPass function.
- #
+
# @method add_mem_cpy_opt_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_mem_cpy_opt_pass, :LLVMAddMemCpyOptPass, [:pointer], :void
-
# See llvm::createPromoteMemoryToRegisterPass function.
- #
+
# @method add_promote_memory_to_register_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_promote_memory_to_register_pass, :LLVMAddPromoteMemoryToRegisterPass, [:pointer], :void
-
# See llvm::createReassociatePass function.
- #
+
# @method add_reassociate_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_reassociate_pass, :LLVMAddReassociatePass, [:pointer], :void
-
# See llvm::createSCCPPass function.
- #
+
# @method add_sccp_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_sccp_pass, :LLVMAddSCCPPass, [:pointer], :void
-
# See llvm::createScalarReplAggregatesPass function.
- #
+
# @method add_scalar_repl_aggregates_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_scalar_repl_aggregates_pass, :LLVMAddScalarReplAggregatesPass, [:pointer], :void
-
# See llvm::createScalarReplAggregatesPass function.
- #
+
# @method add_scalar_repl_aggregates_pass_ssa(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_scalar_repl_aggregates_pass_ssa, :LLVMAddScalarReplAggregatesPassSSA, [:pointer], :void
-
# See llvm::createScalarReplAggregatesPass function.
- #
+
# @method add_scalar_repl_aggregates_pass_with_threshold(pm, threshold)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @param [Integer] threshold
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @param [Integer] threshold
+ # @return [nil]
# @scope class
attach_function :add_scalar_repl_aggregates_pass_with_threshold, :LLVMAddScalarReplAggregatesPassWithThreshold, [:pointer, :int], :void
-
# See llvm::createSimplifyLibCallsPass function.
- #
+
# @method add_simplify_lib_calls_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_simplify_lib_calls_pass, :LLVMAddSimplifyLibCallsPass, [:pointer], :void
-
# See llvm::createTailCallEliminationPass function.
- #
+
# @method add_tail_call_elimination_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_tail_call_elimination_pass, :LLVMAddTailCallEliminationPass, [:pointer], :void
-
# See llvm::createConstantPropagationPass function.
- #
+
# @method add_constant_propagation_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_constant_propagation_pass, :LLVMAddConstantPropagationPass, [:pointer], :void
-
# See llvm::demotePromoteMemoryToRegisterPass function.
- #
+
# @method add_demote_memory_to_register_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_demote_memory_to_register_pass, :LLVMAddDemoteMemoryToRegisterPass, [:pointer], :void
-
# See llvm::createVerifierPass function.
- #
+
# @method add_verifier_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_verifier_pass, :LLVMAddVerifierPass, [:pointer], :void
-
# See llvm::createCorrelatedValuePropagationPass function
- #
+
# @method add_correlated_value_propagation_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_correlated_value_propagation_pass, :LLVMAddCorrelatedValuePropagationPass, [:pointer], :void
-
# See llvm::createEarlyCSEPass function
- #
+
# @method add_early_cse_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_early_cse_pass, :LLVMAddEarlyCSEPass, [:pointer], :void
-
# See llvm::createLowerExpectIntrinsicPass function
- #
+
# @method add_lower_expect_intrinsic_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_lower_expect_intrinsic_pass, :LLVMAddLowerExpectIntrinsicPass, [:pointer], :void
-
# See llvm::createTypeBasedAliasAnalysisPass function
- #
+
# @method add_type_based_alias_analysis_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_type_based_alias_analysis_pass, :LLVMAddTypeBasedAliasAnalysisPass, [:pointer], :void
-
# See llvm::createBasicAliasAnalysisPass function
- #
+
# @method add_basic_alias_analysis_pass(pm)
- # @param [FFI::Pointer(PassManagerRef)] pm
- # @return [nil]
+ # @param [FFI::Pointer(PassManagerRef)] pm
+ # @return [nil]
# @scope class
attach_function :add_basic_alias_analysis_pass, :LLVMAddBasicAliasAnalysisPass, [:pointer], :void
-
end
diff --git a/test/output/llvm-c/lto.rb b/test/output/llvm-c/lto.rb
index 1cc26bd..bf175e3 100644
--- a/test/output/llvm-c/lto.rb
+++ b/test/output/llvm-c/lto.rb
@@ -1,65 +1,67 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module LLVM
+
extend FFI::Library
- ffi_lib 'LLVM-3.0'
-
+
+ ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"]
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
LTO_H = 1
-
+
LTO_API_VERSION = 4
-
+
# (Not documented)
- #
- # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:lto_symbol_attributes).
- #
+
+ # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:lto_symbol_alignment_mask1225945966).
+
# === Options:
# :alignment_mask ::
- #
+
# :permissions_mask ::
# log2 of alignment
# :permissions_code ::
- #
+
# :permissions_data ::
- #
+
# :permissions_rodata ::
- #
+
# :definition_mask ::
- #
+
# :definition_regular ::
- #
+
# :definition_tentative ::
- #
+
# :definition_weak ::
- #
+
# :definition_undefined ::
- #
+
# :definition_weakundef ::
- #
+
# :scope_mask ::
- #
+
# :scope_internal ::
- #
+
# :scope_hidden ::
- #
+
# :scope_protected ::
- #
+
# :scope_default ::
- #
+
# :scope_default_can_be_hidden ::
- #
- #
- # @method _enum_lto_symbol_attributes_
+
+
+ # @method _enum_lto_symbol_alignment_mask1225945966_
# @return [Symbol]
# @scope class
- enum :lto_symbol_attributes, [
+ enum :lto_symbol_alignment_mask1225945966, [
:alignment_mask, 31,
:permissions_mask, 224,
:permissions_code, 160,
@@ -78,17 +80,17 @@ def self.attach_function(name, *_)
:scope_default, 6144,
:scope_default_can_be_hidden, 10240
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:lto_debug_model).
- #
+
# === Options:
# :none ::
- #
+
# :dwarf ::
- #
- #
+
+
# @method _enum_lto_debug_model_
# @return [Symbol]
# @scope class
@@ -96,19 +98,19 @@ def self.attach_function(name, *_)
:none, 0,
:dwarf, 1
]
-
+
# (Not documented)
- #
+
# This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:lto_codegen_model).
- #
+
# === Options:
# :pic_model_static ::
- #
+
# :pic_model_dynamic ::
- #
+
# :pic_model_dynamic_no_pic ::
- #
- #
+
+
# @method _enum_lto_codegen_model_
# @return [Symbol]
# @scope class
@@ -117,327 +119,298 @@ def self.attach_function(name, *_)
:pic_model_dynamic, 1,
:pic_model_dynamic_no_pic, 2
]
-
+
# opaque reference to a loaded object module
module LTOModuleWrappers
- # @return [nil]
+ # @return [nil]
def dispose()
LLVM.lto_module_dispose(self)
end
-
- # @return [String]
+
+ # @return [String]
def get_target_triple()
LLVM.lto_module_get_target_triple(self)
end
-
- # @param [String] triple
- # @return [nil]
+
+ # @param [String] triple
+ # @return [nil]
def set_target_triple(triple)
LLVM.lto_module_set_target_triple(self, triple)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def get_num_symbols()
LLVM.lto_module_get_num_symbols(self)
end
-
- # @param [Integer] index
- # @return [String]
+
+ # @param [Integer] index
+ # @return [String]
def get_symbol_name(index)
LLVM.lto_module_get_symbol_name(self, index)
end
-
- # @param [Integer] index
- # @return [Symbol from _enum_lto_symbol_attributes_]
+
+ # @param [Integer] index
+ # @return [Integer]
def get_symbol_attribute(index)
LLVM.lto_module_get_symbol_attribute(self, index)
end
end
-
+
class LTOModule < FFI::Struct
include LTOModuleWrappers
layout :dummy, :char
end
-
+
# opaque reference to a code generator
class LTOCodeGenerator < FFI::Struct
layout :dummy, :char
end
-
+
# Returns a printable string.
- #
+
# @method lto_get_version()
- # @return [String]
+ # @return [String]
# @scope class
attach_function :lto_get_version, :lto_get_version, [], :string
-
# Returns the last error string or NULL if last operation was successful.
- #
+
# @method lto_get_error_message()
- # @return [String]
+ # @return [String]
# @scope class
attach_function :lto_get_error_message, :lto_get_error_message, [], :string
-
# Checks if a file is a loadable object file.
- #
+
# @method lto_module_is_object_file(path)
- # @param [String] path
- # @return [Boolean]
+ # @param [String] path
+ # @return [Integer]
# @scope class
- attach_function :lto_module_is_object_file, :lto_module_is_object_file, [:string], :bool
-
+ attach_function :lto_module_is_object_file, :lto_module_is_object_file, [:string], :int
# Checks if a file is a loadable object compiled for requested target.
- #
+
# @method lto_module_is_object_file_for_target(path, target_triple_prefix)
- # @param [String] path
- # @param [String] target_triple_prefix
- # @return [Boolean]
+ # @param [String] path
+ # @param [String] target_triple_prefix
+ # @return [Integer]
# @scope class
- attach_function :lto_module_is_object_file_for_target, :lto_module_is_object_file_for_target, [:string, :string], :bool
-
+ attach_function :lto_module_is_object_file_for_target, :lto_module_is_object_file_for_target, [:string, :string], :int
# Checks if a buffer is a loadable object file.
- #
+
# @method lto_module_is_object_file_in_memory(mem, length)
- # @param [FFI::Pointer(*Void)] mem
- # @param [Integer] length
- # @return [Boolean]
+ # @param [FFI::Pointer(*Void)] mem
+ # @param [Integer] length
+ # @return [Integer]
# @scope class
- attach_function :lto_module_is_object_file_in_memory, :lto_module_is_object_file_in_memory, [:pointer, :ulong], :bool
-
+ attach_function :lto_module_is_object_file_in_memory, :lto_module_is_object_file_in_memory, [:pointer, :int], :int
# Checks if a buffer is a loadable object compiled for requested target.
- #
+
# @method lto_module_is_object_file_in_memory_for_target(mem, length, target_triple_prefix)
- # @param [FFI::Pointer(*Void)] mem
- # @param [Integer] length
- # @param [String] target_triple_prefix
- # @return [Boolean]
+ # @param [FFI::Pointer(*Void)] mem
+ # @param [Integer] length
+ # @param [String] target_triple_prefix
+ # @return [Integer]
# @scope class
- attach_function :lto_module_is_object_file_in_memory_for_target, :lto_module_is_object_file_in_memory_for_target, [:pointer, :ulong, :string], :bool
-
+ attach_function :lto_module_is_object_file_in_memory_for_target, :lto_module_is_object_file_in_memory_for_target, [:pointer, :int, :string], :int
# Loads an object file from disk.
# Returns NULL on error (check lto_get_error_message() for details).
- #
+
# @method lto_module_create(path)
- # @param [String] path
- # @return [LTOModule]
+ # @param [String] path
+ # @return [LTOModule]
# @scope class
attach_function :lto_module_create, :lto_module_create, [:string], LTOModule
-
# Loads an object file from memory.
# Returns NULL on error (check lto_get_error_message() for details).
- #
+
# @method lto_module_create_from_memory(mem, length)
- # @param [FFI::Pointer(*Void)] mem
- # @param [Integer] length
- # @return [LTOModule]
+ # @param [FFI::Pointer(*Void)] mem
+ # @param [Integer] length
+ # @return [LTOModule]
# @scope class
- attach_function :lto_module_create_from_memory, :lto_module_create_from_memory, [:pointer, :ulong], LTOModule
-
+ attach_function :lto_module_create_from_memory, :lto_module_create_from_memory, [:pointer, :int], LTOModule
# Loads an object file from disk. The seek point of fd is not preserved.
# Returns NULL on error (check lto_get_error_message() for details).
- #
+
# @method lto_module_create_from_fd(fd, path, file_size)
- # @param [Integer] fd
- # @param [String] path
- # @param [Integer] file_size
- # @return [LTOModule]
+ # @param [Integer] fd
+ # @param [String] path
+ # @param [Integer] file_size
+ # @return [LTOModule]
# @scope class
- attach_function :lto_module_create_from_fd, :lto_module_create_from_fd, [:int, :string, :ulong], LTOModule
-
+ attach_function :lto_module_create_from_fd, :lto_module_create_from_fd, [:int, :string, :int], LTOModule
# Loads an object file from disk. The seek point of fd is not preserved.
# Returns NULL on error (check lto_get_error_message() for details).
- #
+
# @method lto_module_create_from_fd_at_offset(fd, path, file_size, map_size, offset)
- # @param [Integer] fd
- # @param [String] path
- # @param [Integer] file_size
- # @param [Integer] map_size
- # @param [Integer] offset
- # @return [LTOModule]
- # @scope class
- attach_function :lto_module_create_from_fd_at_offset, :lto_module_create_from_fd_at_offset, [:int, :string, :ulong, :ulong, :long], LTOModule
-
+ # @param [Integer] fd
+ # @param [String] path
+ # @param [Integer] file_size
+ # @param [Integer] map_size
+ # @param [Integer] offset
+ # @return [LTOModule]
+ # @scope class
+ attach_function :lto_module_create_from_fd_at_offset, :lto_module_create_from_fd_at_offset, [:int, :string, :int, :int, :int], LTOModule
# Frees all memory internally allocated by the module.
# Upon return the lto_module_t is no longer valid.
- #
+
# @method lto_module_dispose(mod)
- # @param [LTOModule] mod
- # @return [nil]
+ # @param [LTOModule] mod
+ # @return [nil]
# @scope class
attach_function :lto_module_dispose, :lto_module_dispose, [LTOModule], :void
-
# Returns triple string which the object module was compiled under.
- #
+
# @method lto_module_get_target_triple(mod)
- # @param [LTOModule] mod
- # @return [String]
+ # @param [LTOModule] mod
+ # @return [String]
# @scope class
attach_function :lto_module_get_target_triple, :lto_module_get_target_triple, [LTOModule], :string
-
# Sets triple string with which the object will be codegened.
- #
+
# @method lto_module_set_target_triple(mod, triple)
- # @param [LTOModule] mod
- # @param [String] triple
- # @return [nil]
+ # @param [LTOModule] mod
+ # @param [String] triple
+ # @return [nil]
# @scope class
attach_function :lto_module_set_target_triple, :lto_module_set_target_triple, [LTOModule, :string], :void
-
# Returns the number of symbols in the object module.
- #
+
# @method lto_module_get_num_symbols(mod)
- # @param [LTOModule] mod
- # @return [Integer]
+ # @param [LTOModule] mod
+ # @return [Integer]
# @scope class
attach_function :lto_module_get_num_symbols, :lto_module_get_num_symbols, [LTOModule], :uint
-
# Returns the name of the ith symbol in the object module.
- #
+
# @method lto_module_get_symbol_name(mod, index)
- # @param [LTOModule] mod
- # @param [Integer] index
- # @return [String]
+ # @param [LTOModule] mod
+ # @param [Integer] index
+ # @return [String]
# @scope class
attach_function :lto_module_get_symbol_name, :lto_module_get_symbol_name, [LTOModule, :uint], :string
-
# Returns the attributes of the ith symbol in the object module.
- #
+
# @method lto_module_get_symbol_attribute(mod, index)
- # @param [LTOModule] mod
- # @param [Integer] index
- # @return [Symbol from _enum_lto_symbol_attributes_]
+ # @param [LTOModule] mod
+ # @param [Integer] index
+ # @return [Integer]
# @scope class
- attach_function :lto_module_get_symbol_attribute, :lto_module_get_symbol_attribute, [LTOModule, :uint], :lto_symbol_attributes
-
+ attach_function :lto_module_get_symbol_attribute, :lto_module_get_symbol_attribute, [LTOModule, :uint], :int
# Instantiates a code generator.
# Returns NULL on error (check lto_get_error_message() for details).
- #
+
# @method lto_codegen_create()
- # @return [LTOCodeGenerator]
+ # @return [LTOCodeGenerator]
# @scope class
attach_function :lto_codegen_create, :lto_codegen_create, [], LTOCodeGenerator
-
# Frees all code generator and all memory it internally allocated.
# Upon return the lto_code_gen_t is no longer valid.
- #
+
# @method lto_codegen_dispose(lto_code_generator)
- # @param [LTOCodeGenerator] lto_code_generator
- # @return [nil]
+ # @param [LTOCodeGenerator] lto_code_generator
+ # @return [nil]
# @scope class
attach_function :lto_codegen_dispose, :lto_codegen_dispose, [LTOCodeGenerator], :void
-
# Add an object module to the set of modules for which code will be generated.
# Returns true on error (check lto_get_error_message() for details).
- #
+
# @method lto_codegen_add_module(cg, mod)
- # @param [LTOCodeGenerator] cg
- # @param [LTOModule] mod
- # @return [Boolean]
+ # @param [LTOCodeGenerator] cg
+ # @param [LTOModule] mod
+ # @return [Integer]
# @scope class
- attach_function :lto_codegen_add_module, :lto_codegen_add_module, [LTOCodeGenerator, LTOModule], :bool
-
+ attach_function :lto_codegen_add_module, :lto_codegen_add_module, [LTOCodeGenerator, LTOModule], :int
# Sets if debug info should be generated.
# Returns true on error (check lto_get_error_message() for details).
- #
+
# @method lto_codegen_set_debug_model(cg, lto_debug_model)
- # @param [LTOCodeGenerator] cg
- # @param [Symbol from _enum_lto_debug_model_] lto_debug_model
- # @return [Boolean]
+ # @param [LTOCodeGenerator] cg
+ # @param [Symbol from _enum_lto_debug_model_] lto_debug_model
+ # @return [Integer]
# @scope class
- attach_function :lto_codegen_set_debug_model, :lto_codegen_set_debug_model, [LTOCodeGenerator, :lto_debug_model], :bool
-
+ attach_function :lto_codegen_set_debug_model, :lto_codegen_set_debug_model, [LTOCodeGenerator, :lto_debug_model], :int
# Sets which PIC code model to generated.
# Returns true on error (check lto_get_error_message() for details).
- #
+
# @method lto_codegen_set_pic_model(cg, lto_codegen_model)
- # @param [LTOCodeGenerator] cg
- # @param [Symbol from _enum_lto_codegen_model_] lto_codegen_model
- # @return [Boolean]
+ # @param [LTOCodeGenerator] cg
+ # @param [Symbol from _enum_lto_codegen_model_] lto_codegen_model
+ # @return [Integer]
# @scope class
- attach_function :lto_codegen_set_pic_model, :lto_codegen_set_pic_model, [LTOCodeGenerator, :lto_codegen_model], :bool
-
+ attach_function :lto_codegen_set_pic_model, :lto_codegen_set_pic_model, [LTOCodeGenerator, :lto_codegen_model], :int
# Sets the cpu to generate code for.
- #
+
# @method lto_codegen_set_cpu(cg, cpu)
- # @param [LTOCodeGenerator] cg
- # @param [String] cpu
- # @return [nil]
+ # @param [LTOCodeGenerator] cg
+ # @param [String] cpu
+ # @return [nil]
# @scope class
attach_function :lto_codegen_set_cpu, :lto_codegen_set_cpu, [LTOCodeGenerator, :string], :void
-
# Sets the location of the assembler tool to run. If not set, libLTO
# will use gcc to invoke the assembler.
- #
+
# @method lto_codegen_set_assembler_path(cg, path)
- # @param [LTOCodeGenerator] cg
- # @param [String] path
- # @return [nil]
+ # @param [LTOCodeGenerator] cg
+ # @param [String] path
+ # @return [nil]
# @scope class
attach_function :lto_codegen_set_assembler_path, :lto_codegen_set_assembler_path, [LTOCodeGenerator, :string], :void
-
# Sets extra arguments that libLTO should pass to the assembler.
- #
+
# @method lto_codegen_set_assembler_args(cg, args, nargs)
- # @param [LTOCodeGenerator] cg
- # @param [FFI::Pointer(**CharS)] args
- # @param [Integer] nargs
- # @return [nil]
+ # @param [LTOCodeGenerator] cg
+ # @param [FFI::Pointer(**CharS)] args
+ # @param [Integer] nargs
+ # @return [nil]
# @scope class
attach_function :lto_codegen_set_assembler_args, :lto_codegen_set_assembler_args, [LTOCodeGenerator, :pointer, :int], :void
-
# Adds to a list of all global symbols that must exist in the final
# generated code. If a function is not listed, it might be
# inlined into every usage and optimized away.
- #
+
# @method lto_codegen_add_must_preserve_symbol(cg, symbol)
- # @param [LTOCodeGenerator] cg
- # @param [String] symbol
- # @return [nil]
+ # @param [LTOCodeGenerator] cg
+ # @param [String] symbol
+ # @return [nil]
# @scope class
attach_function :lto_codegen_add_must_preserve_symbol, :lto_codegen_add_must_preserve_symbol, [LTOCodeGenerator, :string], :void
-
# Writes a new object file at the specified path that contains the
# merged contents of all modules added so far.
# Returns true on error (check lto_get_error_message() for details).
- #
+
# @method lto_codegen_write_merged_modules(cg, path)
- # @param [LTOCodeGenerator] cg
- # @param [String] path
- # @return [Boolean]
+ # @param [LTOCodeGenerator] cg
+ # @param [String] path
+ # @return [Integer]
# @scope class
- attach_function :lto_codegen_write_merged_modules, :lto_codegen_write_merged_modules, [LTOCodeGenerator, :string], :bool
-
+ attach_function :lto_codegen_write_merged_modules, :lto_codegen_write_merged_modules, [LTOCodeGenerator, :string], :int
# Generates code for all added modules into one native object file.
# On success returns a pointer to a generated mach-o/ELF buffer and
# length set to the buffer size. The buffer is owned by the
# lto_code_gen_t and will be freed when lto_codegen_dispose()
# is called, or lto_codegen_compile() is called again.
# On failure, returns NULL (check lto_get_error_message() for details).
- #
+
# @method lto_codegen_compile(cg, length)
- # @param [LTOCodeGenerator] cg
- # @param [FFI::Pointer(*SizeT)] length
- # @return [FFI::Pointer(*Void)]
+ # @param [LTOCodeGenerator] cg
+ # @param [FFI::Pointer(*Int)] length
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :lto_codegen_compile, :lto_codegen_compile, [LTOCodeGenerator, :pointer], :pointer
-
# Generates code for all added modules into one native object file.
# The name of the file is written to name. Returns true on error.
- #
+
# @method lto_codegen_compile_to_file(cg, name)
- # @param [LTOCodeGenerator] cg
- # @param [FFI::Pointer(**CharS)] name
- # @return [Boolean]
+ # @param [LTOCodeGenerator] cg
+ # @param [FFI::Pointer(**CharS)] name
+ # @return [Integer]
# @scope class
- attach_function :lto_codegen_compile_to_file, :lto_codegen_compile_to_file, [LTOCodeGenerator, :pointer], :bool
-
+ attach_function :lto_codegen_compile_to_file, :lto_codegen_compile_to_file, [LTOCodeGenerator, :pointer], :int
# Sets options to help debug codegen bugs.
- #
+
# @method lto_codegen_debug_options(cg, string)
- # @param [LTOCodeGenerator] cg
- # @param [String] string
- # @return [nil]
+ # @param [LTOCodeGenerator] cg
+ # @param [String] string
+ # @return [nil]
# @scope class
attach_function :lto_codegen_debug_options, :lto_codegen_debug_options, [LTOCodeGenerator, :string], :void
-
end
diff --git a/test/output/sqlite3.rb b/test/output/sqlite3.rb
index 29e755d..83ea5cc 100644
--- a/test/output/sqlite3.rb
+++ b/test/output/sqlite3.rb
@@ -1,480 +1,482 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
require 'ffi'
module SQLite3
+
extend FFI::Library
- ffi_lib 'sqlite3'
-
+
+ ffi_lib ENV["SQLITE3_PATH"] || "sqlite3"
+
def self.attach_function(name, *_)
begin; super; rescue FFI::NotFoundError => e
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
end
end
-
+
VERSION = "3.7.9"
-
+
VERSION_NUMBER = 3007009
-
+
SOURCE_ID = "2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e"
-
+
OK = 0
-
+
ERROR = 1
-
+
INTERNAL = 2
-
+
PERM = 3
-
+
ABORT = 4
-
+
BUSY = 5
-
+
LOCKED = 6
-
+
NOMEM = 7
-
+
READONLY = 8
-
+
INTERRUPT = 9
-
+
IOERR = 10
-
+
CORRUPT = 11
-
+
NOTFOUND = 12
-
+
FULL = 13
-
+
CANTOPEN = 14
-
+
PROTOCOL = 15
-
+
EMPTY = 16
-
+
SCHEMA = 17
-
+
TOOBIG = 18
-
+
CONSTRAINT = 19
-
+
MISMATCH = 20
-
+
MISUSE = 21
-
+
NOLFS = 22
-
+
AUTH = 23
-
+
FORMAT = 24
-
+
RANGE = 25
-
+
NOTADB = 26
-
+
ROW = 100
-
+
DONE = 101
-
+
OPEN_READONLY = 0x00000001
-
+
OPEN_READWRITE = 0x00000002
-
+
OPEN_CREATE = 0x00000004
-
+
OPEN_DELETEONCLOSE = 0x00000008
-
+
OPEN_EXCLUSIVE = 0x00000010
-
+
OPEN_AUTOPROXY = 0x00000020
-
+
OPEN_URI = 0x00000040
-
+
OPEN_MAIN_DB = 0x00000100
-
+
OPEN_TEMP_DB = 0x00000200
-
+
OPEN_TRANSIENT_DB = 0x00000400
-
+
OPEN_MAIN_JOURNAL = 0x00000800
-
+
OPEN_TEMP_JOURNAL = 0x00001000
-
+
OPEN_SUBJOURNAL = 0x00002000
-
+
OPEN_MASTER_JOURNAL = 0x00004000
-
+
OPEN_NOMUTEX = 0x00008000
-
+
OPEN_FULLMUTEX = 0x00010000
-
+
OPEN_SHAREDCACHE = 0x00020000
-
+
OPEN_PRIVATECACHE = 0x00040000
-
+
OPEN_WAL = 0x00080000
-
+
IOCAP_ATOMIC = 0x00000001
-
+
IOCAP_ATOMIC512 = 0x00000002
-
+
IOCAP_ATOMIC1K = 0x00000004
-
+
IOCAP_ATOMIC2K = 0x00000008
-
+
IOCAP_ATOMIC4K = 0x00000010
-
+
IOCAP_ATOMIC8K = 0x00000020
-
+
IOCAP_ATOMIC16K = 0x00000040
-
+
IOCAP_ATOMIC32K = 0x00000080
-
+
IOCAP_ATOMIC64K = 0x00000100
-
+
IOCAP_SAFE_APPEND = 0x00000200
-
+
IOCAP_SEQUENTIAL = 0x00000400
-
+
IOCAP_UNDELETABLE_WHEN_OPEN = 0x00000800
-
+
LOCK_NONE = 0
-
+
LOCK_SHARED = 1
-
+
LOCK_RESERVED = 2
-
+
LOCK_PENDING = 3
-
+
LOCK_EXCLUSIVE = 4
-
+
SYNC_NORMAL = 0x00002
-
+
SYNC_FULL = 0x00003
-
+
SYNC_DATAONLY = 0x00010
-
+
FCNTL_LOCKSTATE = 1
-
+
GET_LOCKPROXYFILE = 2
-
+
SET_LOCKPROXYFILE = 3
-
+
LAST_ERRNO = 4
-
+
FCNTL_SIZE_HINT = 5
-
+
FCNTL_CHUNK_SIZE = 6
-
+
FCNTL_FILE_POINTER = 7
-
+
FCNTL_SYNC_OMITTED = 8
-
+
FCNTL_WIN32_AV_RETRY = 9
-
+
FCNTL_PERSIST_WAL = 10
-
+
FCNTL_OVERWRITE = 11
-
+
ACCESS_EXISTS = 0
-
+
ACCESS_READWRITE = 1
-
+
ACCESS_READ = 2
-
+
SHM_UNLOCK = 1
-
+
SHM_LOCK = 2
-
+
SHM_SHARED = 4
-
+
SHM_EXCLUSIVE = 8
-
+
SHM_NLOCK = 8
-
+
CONFIG_SINGLETHREAD = 1
-
+
CONFIG_MULTITHREAD = 2
-
+
CONFIG_SERIALIZED = 3
-
+
CONFIG_MALLOC = 4
-
+
CONFIG_GETMALLOC = 5
-
+
CONFIG_SCRATCH = 6
-
+
CONFIG_PAGECACHE = 7
-
+
CONFIG_HEAP = 8
-
+
CONFIG_MEMSTATUS = 9
-
+
CONFIG_MUTEX = 10
-
+
CONFIG_GETMUTEX = 11
-
+
CONFIG_LOOKASIDE = 13
-
+
CONFIG_PCACHE = 14
-
+
CONFIG_GETPCACHE = 15
-
+
CONFIG_LOG = 16
-
+
CONFIG_URI = 17
-
+
DBCONFIG_LOOKASIDE = 1001
-
+
DBCONFIG_ENABLE_FKEY = 1002
-
+
DBCONFIG_ENABLE_TRIGGER = 1003
-
+
DENY = 1
-
+
IGNORE = 2
-
+
CREATE_INDEX = 1
-
+
CREATE_TABLE = 2
-
+
CREATE_TEMP_INDEX = 3
-
+
CREATE_TEMP_TABLE = 4
-
+
CREATE_TEMP_TRIGGER = 5
-
+
CREATE_TEMP_VIEW = 6
-
+
CREATE_TRIGGER = 7
-
+
CREATE_VIEW = 8
-
+
DELETE = 9
-
+
DROP_INDEX = 10
-
+
DROP_TABLE = 11
-
+
DROP_TEMP_INDEX = 12
-
+
DROP_TEMP_TABLE = 13
-
+
DROP_TEMP_TRIGGER = 14
-
+
DROP_TEMP_VIEW = 15
-
+
DROP_TRIGGER = 16
-
+
DROP_VIEW = 17
-
+
INSERT = 18
-
+
PRAGMA = 19
-
+
READ = 20
-
+
SELECT = 21
-
+
TRANSACTION = 22
-
+
UPDATE = 23
-
+
ATTACH = 24
-
+
DETACH = 25
-
+
ALTER_TABLE = 26
-
+
REINDEX = 27
-
+
ANALYZE = 28
-
+
CREATE_VTABLE = 29
-
+
DROP_VTABLE = 30
-
+
FUNCTION = 31
-
+
SAVEPOINT = 32
-
+
COPY = 0
-
+
LIMIT_LENGTH = 0
-
+
LIMIT_SQL_LENGTH = 1
-
+
LIMIT_COLUMN = 2
-
+
LIMIT_EXPR_DEPTH = 3
-
+
LIMIT_COMPOUND_SELECT = 4
-
+
LIMIT_VDBE_OP = 5
-
+
LIMIT_FUNCTION_ARG = 6
-
+
LIMIT_ATTACHED = 7
-
+
LIMIT_LIKE_PATTERN_LENGTH = 8
-
+
LIMIT_VARIABLE_NUMBER = 9
-
+
LIMIT_TRIGGER_DEPTH = 10
-
+
INTEGER = 1
-
+
FLOAT = 2
-
+
BLOB = 4
-
+
NULL = 5
-
+
TEXT = 3
-
+
SQLITE3_TEXT = 3
-
+
UTF8 = 1
-
+
UTF16LE = 2
-
+
UTF16BE = 3
-
+
UTF16 = 4
-
+
ANY = 5
-
+
UTF16_ALIGNED = 8
-
+
INDEX_CONSTRAINT_EQ = 2
-
+
INDEX_CONSTRAINT_GT = 4
-
+
INDEX_CONSTRAINT_LE = 8
-
+
INDEX_CONSTRAINT_LT = 16
-
+
INDEX_CONSTRAINT_GE = 32
-
+
INDEX_CONSTRAINT_MATCH = 64
-
+
MUTEX_FAST = 0
-
+
MUTEX_RECURSIVE = 1
-
+
MUTEX_STATIC_MASTER = 2
-
+
MUTEX_STATIC_MEM = 3
-
+
MUTEX_STATIC_MEM2 = 4
-
+
MUTEX_STATIC_OPEN = 4
-
+
MUTEX_STATIC_PRNG = 5
-
+
MUTEX_STATIC_LRU = 6
-
+
MUTEX_STATIC_LRU2 = 7
-
+
MUTEX_STATIC_PMEM = 7
-
+
TESTCTRL_FIRST = 5
-
+
TESTCTRL_PRNG_SAVE = 5
-
+
TESTCTRL_PRNG_RESTORE = 6
-
+
TESTCTRL_PRNG_RESET = 7
-
+
TESTCTRL_BITVEC_TEST = 8
-
+
TESTCTRL_FAULT_INSTALL = 9
-
+
TESTCTRL_BENIGN_MALLOC_HOOKS = 10
-
+
TESTCTRL_PENDING_BYTE = 11
-
+
TESTCTRL_ASSERT = 12
-
+
TESTCTRL_ALWAYS = 13
-
+
TESTCTRL_RESERVE = 14
-
+
TESTCTRL_OPTIMIZATIONS = 15
-
+
TESTCTRL_ISKEYWORD = 16
-
+
TESTCTRL_PGHDRSZ = 17
-
+
TESTCTRL_SCRATCHMALLOC = 18
-
+
TESTCTRL_LOCALTIME_FAULT = 19
-
+
TESTCTRL_LAST = 19
-
+
STATUS_MEMORY_USED = 0
-
+
STATUS_PAGECACHE_USED = 1
-
+
STATUS_PAGECACHE_OVERFLOW = 2
-
+
STATUS_SCRATCH_USED = 3
-
+
STATUS_SCRATCH_OVERFLOW = 4
-
+
STATUS_MALLOC_SIZE = 5
-
+
STATUS_PARSER_STACK = 6
-
+
STATUS_PAGECACHE_SIZE = 7
-
+
STATUS_SCRATCH_SIZE = 8
-
+
STATUS_MALLOC_COUNT = 9
-
+
DBSTATUS_LOOKASIDE_USED = 0
-
+
DBSTATUS_CACHE_USED = 1
-
+
DBSTATUS_SCHEMA_USED = 2
-
+
DBSTATUS_STMT_USED = 3
-
+
DBSTATUS_LOOKASIDE_HIT = 4
-
+
DBSTATUS_LOOKASIDE_MISS_SIZE = 5
-
+
DBSTATUS_LOOKASIDE_MISS_FULL = 6
-
+
DBSTATUS_CACHE_HIT = 7
-
+
DBSTATUS_CACHE_MISS = 8
-
+
DBSTATUS_MAX = 8
-
+
STMTSTATUS_FULLSCAN_STEP = 1
-
+
STMTSTATUS_SORT = 2
-
+
STMTSTATUS_AUTOINDEX = 3
-
+
CHECKPOINT_PASSIVE = 0
-
+
CHECKPOINT_FULL = 1
-
+
CHECKPOINT_RESTART = 2
-
+
VTAB_CONSTRAINT_SUPPORT = 1
-
+
ROLLBACK = 1
-
+
FAIL = 3
-
+
REPLACE = 5
-
+
# CAPI3REF: Run-Time Library Version Numbers
# KEYWORDS: sqlite3_version, sqlite3_sourceid
- #
+
# These interfaces provide the same information as the (SQLITE_VERSION),
# (SQLITE_VERSION_NUMBER), and (SQLITE_SOURCE_ID) C preprocessor macros
# but are associated with the library instead of the header file. ^(Cautious
@@ -482,13 +484,13 @@ def self.attach_function(name, *_)
# verify that values returned by these interfaces match the macros in
# the header, and thus insure that the application is
# compiled with matching library and header files.
- #
+
#
# assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
# assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
# assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
#
)^
- #
+
# ^The sqlite3_version() string constant contains the text of (SQLITE_VERSION)
# macro. ^The sqlite3_libversion() function returns a pointer to the
# to the sqlite3_version() string constant. The sqlite3_libversion()
@@ -498,85 +500,80 @@ def self.attach_function(name, *_)
# (SQLITE_VERSION_NUMBER). ^The sqlite3_sourceid() function returns
# a pointer to a string constant whose value is the same as the
# (SQLITE_SOURCE_ID) C preprocessor macro.
- #
+
# See also: (sqlite_version()) and (sqlite_source_id()).
- #
+
# @method libversion()
- # @return [String]
+ # @return [String]
# @scope class
attach_function :libversion, :sqlite3_libversion, [], :string
-
# (Not documented)
- #
+
# @method sourceid()
- # @return [String]
+ # @return [String]
# @scope class
attach_function :sourceid, :sqlite3_sourceid, [], :string
-
# (Not documented)
- #
+
# @method libversion_number()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :libversion_number, :sqlite3_libversion_number, [], :int
-
# CAPI3REF: Run-Time Library Compilation Options Diagnostics
- #
+
# ^The sqlite3_compileoption_used() function returns 0 or 1
# indicating whether the specified option was defined at
# compile time. ^The SQLITE_ prefix may be omitted from the
# option name passed to sqlite3_compileoption_used().
- #
+
# ^The sqlite3_compileoption_get() function allows iterating
# over the list of options that were defined at compile time by
# returning the N-th compile time option string. ^If N is out of range,
# sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_
# prefix is omitted from any strings returned by
# sqlite3_compileoption_get().
- #
+
# ^Support for the diagnostic functions sqlite3_compileoption_used()
# and sqlite3_compileoption_get() may be omitted by specifying the
# (SQLITE_OMIT_COMPILEOPTION_DIAGS) option at compile time.
- #
+
# See also: SQL functions (sqlite_compileoption_used()) and
# (sqlite_compileoption_get()) and the (compile_options pragma).
- #
+
# @method compileoption_used(z_opt_name)
- # @param [String] z_opt_name
- # @return [Integer]
+ # @param [String] z_opt_name
+ # @return [Integer]
# @scope class
attach_function :compileoption_used, :sqlite3_compileoption_used, [:string], :int
-
# (Not documented)
- #
+
# @method compileoption_get(n)
- # @param [Integer] n
- # @return [String]
+ # @param [Integer] n
+ # @return [String]
# @scope class
attach_function :compileoption_get, :sqlite3_compileoption_get, [:int], :string
-
# CAPI3REF: Test To See If The Library Is Threadsafe
- #
+
# ^The sqlite3_threadsafe() function returns zero if and only if
# SQLite was compiled mutexing code omitted due to the
# (SQLITE_THREADSAFE) compile-time option being set to 0.
- #
+
# SQLite can be compiled with or without mutexes. When
# the (SQLITE_THREADSAFE) C preprocessor macro is 1 or 2, mutexes
# are enabled and SQLite is threadsafe. When the
# (SQLITE_THREADSAFE) macro is 0,
# the mutexes are omitted. Without the mutexes, it is not safe
# to use SQLite concurrently from more than one thread.
- #
+
# Enabling mutexes incurs a measurable performance penalty.
# So if speed is of utmost importance, it makes sense to disable
# the mutexes. But for maximum safety, mutexes should be enabled.
# ^The default behavior is for mutexes to be enabled.
- #
+
# This interface can be used by an application to make sure that the
# version of SQLite that it is linking against was compiled with
# the desired setting of the (SQLITE_THREADSAFE) macro.
- #
+
# This interface only reports on the compile-time mutex setting
# of the (SQLITE_THREADSAFE) flag. If SQLite is compiled with
# SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but
@@ -587,17 +584,16 @@ def self.attach_function(name, *_)
# thread safety, not any run-time changes to that setting made by
# sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
# is unchanged by calls to sqlite3_config().)^
- #
+
# See the (threading mode) documentation for additional information.
- #
+
# @method threadsafe()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :threadsafe, :sqlite3_threadsafe, [], :int
-
# CAPI3REF: Database Connection Handle
# KEYWORDS: {database connection} {database connections}
- #
+
# Each open SQLite database is represented by a pointer to an instance of
# the opaque structure named "sqlite3". It is useful to think of an sqlite3
# pointer as an object. The (sqlite3_open()), (sqlite3_open16()), and
@@ -609,57 +605,57 @@ def self.attach_function(name, *_)
class Sqlite3 < FFI::Struct
layout :dummy, :char
end
-
+
# CAPI3REF: Closing A Database Connection
- #
+
# ^The sqlite3_close() routine is the destructor for the (sqlite3) object.
# ^Calls to sqlite3_close() return SQLITE_OK if the (sqlite3) object is
# successfully destroyed and all associated resources are deallocated.
- #
+
# Applications must (sqlite3_finalize | finalize) all (prepared statements)
# and (sqlite3_blob_close | close) all (BLOB handles) associated with
# the (sqlite3) object prior to attempting to close the object. ^If
# sqlite3_close() is called on a (database connection) that still has
# outstanding (prepared statements) or (BLOB handles), then it returns
# SQLITE_BUSY.
- #
+
# ^If (sqlite3_close()) is invoked while a transaction is open,
# the transaction is automatically rolled back.
- #
+
# The C parameter to (sqlite3_close(C)) must be either a NULL
# pointer or an (sqlite3) object pointer obtained
# from (sqlite3_open()), (sqlite3_open16()), or
# (sqlite3_open_v2()), and not previously closed.
# ^Calling sqlite3_close() with a NULL pointer argument is a
# harmless no-op.
- #
+
# @method close(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @return [Integer]
# @scope class
attach_function :close, :sqlite3_close, [Sqlite3], :int
-
# The type for a callback function.
# This is legacy and deprecated. It is included for historical
# compatibility and is not documented.
- #
+
# This entry is only for documentation and no real method.
- #
- # @method _callback_callback_(int, char_s, char_s)
- # @param [Integer] int
- # @param [FFI::Pointer(**CharS)] char_s
- # @param [FFI::Pointer(**CharS)] char_s
- # @return [FFI::Pointer(*Void)]
- # @scope class
- callback :callback, [:int, :pointer, :pointer], :pointer
-
+
+ # @method _callback_callback_(void, int, char_s, char_s)
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] int
+ # @param [FFI::Pointer(**CharS)] char_s
+ # @param [FFI::Pointer(**CharS)] char_s
+ # @return [FFI::Pointer(*Void)]
+ # @scope class
+ callback :callback, [:pointer, :int, :pointer, :pointer], :pointer
+
# CAPI3REF: One-Step Query Execution Interface
- #
+
# The sqlite3_exec() interface is a convenience wrapper around
# (sqlite3_prepare_v2()), (sqlite3_step()), and (sqlite3_finalize()),
# that allows an application to run multiple statements of SQL
# without having to use a lot of C code.
- #
+
# ^The sqlite3_exec() interface runs zero or more UTF-8 encoded,
# semicolon-separate SQL statements passed into its 2nd argument,
# in the context of the (database connection) passed in as its 1st
@@ -670,7 +666,7 @@ class Sqlite3 < FFI::Struct
# callback invocation. ^If the callback pointer to sqlite3_exec()
# is NULL, then no callback is ever invoked and result rows are
# ignored.
- #
+
# ^If an error occurs while evaluating the SQL statements passed into
# sqlite3_exec(), then execution of the current statement stops and
# subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec()
@@ -682,11 +678,11 @@ class Sqlite3 < FFI::Struct
# ^If the 5th parameter to sqlite3_exec() is not NULL and no errors
# occur, then sqlite3_exec() sets the pointer in its 5th parameter to
# NULL before returning.
- #
+
# ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec()
# routine returns SQLITE_ABORT without invoking the callback again and
# without running any subsequent SQL statements.
- #
+
# ^The 2nd argument to the sqlite3_exec() callback function is the
# number of columns in the result. ^The 3rd argument to the sqlite3_exec()
# callback is an array of pointers to strings obtained as if from
@@ -696,14 +692,14 @@ class Sqlite3 < FFI::Struct
# sqlite3_exec() callback is an array of pointers to strings where each
# entry represents the name of corresponding result column as obtained
# from (sqlite3_column_name()).
- #
+
# ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer
# to an empty string, or a pointer that contains only whitespace and/or
# SQL comments, then no SQL statements are evaluated and the database
# is not changed.
- #
+
# Restrictions:
- #
+
#
# - The application must insure that the 1st parameter to sqlite3_exec()
# is a valid and open (database connection).
@@ -712,19 +708,18 @@ class Sqlite3 < FFI::Struct
#
- The application must not modify the SQL statement text passed into
# the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
#
- #
+
# @method exec(sqlite3, sql, callback, void, errmsg)
- # @param [Sqlite3] sqlite3
- # @param [String] sql
- # @param [FFI::Pointer(*)] callback
- # @param [FFI::Pointer(*Void)] void
- # @param [FFI::Pointer(**CharS)] errmsg
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [String] sql
+ # @param [FFI::Pointer(*FunctionProto)] callback
+ # @param [FFI::Pointer(*Void)] void
+ # @param [FFI::Pointer(**CharS)] errmsg
+ # @return [Integer]
# @scope class
attach_function :exec, :sqlite3_exec, [Sqlite3, :string, :pointer, :pointer, :pointer], :int
-
# CAPI3REF: OS Interface Open File Handle
- #
+
# An (sqlite3_file) object represents an open file in the
# (sqlite3_vfs | OS interface layer). Individual OS interface
# implementations will
@@ -732,51 +727,51 @@ class Sqlite3 < FFI::Struct
# for their own use. The pMethods entry is a pointer to an
# (sqlite3_io_methods) object that defines methods for performing
# I/O operations on the open file.
- #
+
# = Fields:
# :p_methods ::
# (FFI::Pointer(*IoMethods)) Methods for an open file
class File < FFI::Struct
layout :p_methods, :pointer
end
-
+
# (Not documented)
- #
+
# = Fields:
# :i_version ::
- # (Integer)
+ # (Integer)
# :x_close ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_read ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_write ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_truncate ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_sync ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_file_size ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_lock ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_unlock ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_check_reserved_lock ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_file_control ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_sector_size ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_device_characteristics ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_shm_map ::
- # (FFI::Pointer(*)) Methods above are valid for version 1
+ # (FFI::Pointer(*FunctionProto)) Methods above are valid for version 1
# :x_shm_lock ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_shm_barrier ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_shm_unmap ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
class IoMethods < FFI::Struct
layout :i_version, :int,
:x_close, :pointer,
@@ -796,86 +791,86 @@ class IoMethods < FFI::Struct
:x_shm_barrier, :pointer,
:x_shm_unmap, :pointer
end
-
+
# CAPI3REF: Mutex Handle
- #
+
# The mutex module within SQLite defines (sqlite3_mutex) to be an
# abstract type for a mutex object. The SQLite core never looks
# at the internal representation of an (sqlite3_mutex). It only
# deals with pointers to the (sqlite3_mutex) object.
- #
+
# Mutexes are created using (sqlite3_mutex_alloc()).
module MutexWrappers
- # @return [nil]
+ # @return [nil]
def free()
SQLite3.mutex_free(self)
end
-
- # @return [nil]
+
+ # @return [nil]
def enter()
SQLite3.mutex_enter(self)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def try()
SQLite3.mutex_try(self)
end
-
- # @return [nil]
+
+ # @return [nil]
def leave()
SQLite3.mutex_leave(self)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def held()
SQLite3.mutex_held(self)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def notheld()
SQLite3.mutex_notheld(self)
end
end
-
+
class Mutex < FFI::Struct
include MutexWrappers
layout :dummy, :char
end
-
+
# CAPI3REF: OS Interface Object
- #
+
# An instance of the sqlite3_vfs object defines the interface between
# the SQLite core and the underlying operating system. The "vfs"
# in the name of the object stands for "virtual file system". See
# the (VFS | VFS documentation) for further information.
- #
+
# The value of the iVersion field is initially 1 but may be larger in
# future versions of SQLite. Additional fields may be appended to this
# object when the iVersion value is increased. Note that the structure
# of the sqlite3_vfs object changes in the transaction between
# SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not
# modified.
- #
+
# The szOsFile field is the size of the subclassed (sqlite3_file)
# structure used by this VFS. mxPathname is the maximum length of
# a pathname in this VFS.
- #
+
# Registered sqlite3_vfs objects are kept on a linked list formed by
# the pNext pointer. The (sqlite3_vfs_register())
# and (sqlite3_vfs_unregister()) interfaces manage this list
# in a thread-safe way. The (sqlite3_vfs_find()) interface
# searches the list. Neither the application code nor the VFS
# implementation should use the pNext pointer.
- #
+
# The pNext field is the only field in the sqlite3_vfs
# structure that SQLite will ever modify. SQLite will only access
# or modify this field while holding a particular static mutex.
# The application should never modify anything within the sqlite3_vfs
# object once the object has been registered.
- #
+
# The zName field holds the name of the VFS module. The name must
# be unique across all VFS modules.
- #
+
# ((sqlite3_vfs.xOpen))
# ^SQLite guarantees that the zFilename parameter to xOpen
# is either a NULL pointer or string obtained
@@ -892,17 +887,17 @@ class Mutex < FFI::Struct
# must invent its own temporary name for the file. ^Whenever the
# xFilename parameter is NULL it will also be the case that the
# flags parameter will include (SQLITE_OPEN_DELETEONCLOSE).
- #
+
# The flags argument to xOpen() includes all bits set in
# the flags argument to (sqlite3_open_v2()). Or if (sqlite3_open())
# or (sqlite3_open16()) is used, then flags includes at least
# (SQLITE_OPEN_READWRITE) | (SQLITE_OPEN_CREATE).
# If xOpen() opens a file read-only then it sets *pOutFlags to
# include (SQLITE_OPEN_READONLY). Other bits in *pOutFlags may be set.
- #
+
# ^(SQLite will also add one of the following flags to the xOpen()
# call, depending on the object being opened:
- #
+
#
# - (SQLITE_OPEN_MAIN_DB)
#
- (SQLITE_OPEN_MAIN_JOURNAL)
@@ -913,7 +908,7 @@ class Mutex < FFI::Struct
#
- (SQLITE_OPEN_MASTER_JOURNAL)
#
- (SQLITE_OPEN_WAL)
#
)^
- #
+
# The file I/O implementation can use the object type flags to
# change the way it deals with files. For example, an application
# that does not care about crash recovery or rollback might make
@@ -922,19 +917,19 @@ class Mutex < FFI::Struct
# SQLITE_IOERR. Or the implementation might recognize that a database
# file will be doing page-aligned sector reads and writes in a random
# order and set up its I/O subsystem accordingly.
- #
+
# SQLite might also add one of the following flags to the xOpen method:
- #
+
#
# - (SQLITE_OPEN_DELETEONCLOSE)
#
- (SQLITE_OPEN_EXCLUSIVE)
#
- #
+
# The (SQLITE_OPEN_DELETEONCLOSE) flag means the file should be
# deleted when it is closed. ^The (SQLITE_OPEN_DELETEONCLOSE)
# will be set for TEMP databases and their journals, transient
# databases, and subjournals.
- #
+
# ^The (SQLITE_OPEN_EXCLUSIVE) flag is always used in conjunction
# with the (SQLITE_OPEN_CREATE) flag, which are both directly
# analogous to the O_EXCL and O_CREAT flags of the POSIX open()
@@ -943,7 +938,7 @@ class Mutex < FFI::Struct
# be created, and that it is an error if it already exists.
# It is not used to indicate the file should be opened
# for exclusive access.
- #
+
# ^At least szOsFile bytes of memory are allocated by SQLite
# to hold the (sqlite3_file) structure passed as the third
# argument to xOpen. The xOpen method does not have to
@@ -953,21 +948,21 @@ class Mutex < FFI::Struct
# this even if the open fails. SQLite expects that the sqlite3_file.pMethods
# element will be valid after xOpen returns regardless of the success
# or failure of the xOpen call.
- #
+
# ((sqlite3_vfs.xAccess))
# ^The flags argument to xAccess() may be (SQLITE_ACCESS_EXISTS)
# to test for the existence of a file, or (SQLITE_ACCESS_READWRITE) to
# test whether a file is readable and writable, or (SQLITE_ACCESS_READ)
# to test whether a file is at least readable. The file can be a
# directory.
- #
+
# ^SQLite will always allocate at least mxPathname+1 bytes for the
# output buffer xFullPathname. The exact size of the output buffer
# is also passed as a parameter to both methods. If the output buffer
# is not large enough, (SQLITE_CANTOPEN) should be returned. Since this is
# handled as a fatal error by SQLite, vfs implementations should endeavor
# to prevent this by setting mxPathname to a sufficiently large value.
- #
+
# The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()
# interfaces are not strictly a part of the filesystem, but they are
# included in the VFS structure for completeness.
@@ -985,7 +980,7 @@ class Mutex < FFI::Struct
# date and time if that method is available (if iVersion is 2 or
# greater and the function pointer is not NULL) and will fall back
# to xCurrentTime() if xCurrentTimeInt64() is unavailable.
- #
+
# ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces
# are not used by the SQLite core. These optional interfaces are provided
# by some VFSes to facilitate testing of the VFS code. By overriding
@@ -997,7 +992,7 @@ class Mutex < FFI::Struct
# or all of these interfaces to be NULL or for their behavior to change
# from one release to the next. Applications must not attempt to access
# any of these methods if the iVersion of the VFS is less than 3.
- #
+
# = Fields:
# :i_version ::
# (Integer) Structure version number (currently 3)
@@ -1012,52 +1007,52 @@ class Mutex < FFI::Struct
# :p_app_data ::
# (FFI::Pointer(*Void)) Pointer to application-specific data
# :x_open ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_delete ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_access ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_full_pathname ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_dl_open ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_dl_error ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_dl_sym ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_dl_close ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_randomness ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_sleep ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_current_time ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_get_last_error ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_current_time_int64 ::
- # (FFI::Pointer(*)) The methods above are in version 1 of the sqlite_vfs object
+ # (FFI::Pointer(*FunctionProto)) The methods above are in version 1 of the sqlite_vfs object
# definition. Those that follow are added in version 2 or later
# :x_set_system_call ::
- # (FFI::Pointer(*)) The methods above are in versions 1 and 2 of the sqlite_vfs object.
+ # (FFI::Pointer(*FunctionProto)) The methods above are in versions 1 and 2 of the sqlite_vfs object.
# Those below are for version 3 and greater.
# :x_get_system_call ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_next_system_call ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
module VfsWrappers
- # @param [Integer] make_dflt
- # @return [Integer]
+ # @param [Integer] make_dflt
+ # @return [Integer]
def register(make_dflt)
SQLite3.vfs_register(self, make_dflt)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def unregister()
SQLite3.vfs_unregister(self)
end
end
-
+
class Vfs < FFI::Struct
include VfsWrappers
layout :i_version, :int,
@@ -1083,43 +1078,43 @@ class Vfs < FFI::Struct
:x_get_system_call, :pointer,
:x_next_system_call, :pointer
end
-
+
# CAPI3REF: Initialize The SQLite Library
- #
+
# ^The sqlite3_initialize() routine initializes the
# SQLite library. ^The sqlite3_shutdown() routine
# deallocates any resources that were allocated by sqlite3_initialize().
# These routines are designed to aid in process initialization and
# shutdown on embedded systems. Workstation applications using
# SQLite normally do not need to invoke either of these routines.
- #
+
# A call to sqlite3_initialize() is an "effective" call if it is
# the first time sqlite3_initialize() is invoked during the lifetime of
# the process, or if it is the first time sqlite3_initialize() is invoked
# following a call to sqlite3_shutdown(). ^(Only an effective call
# of sqlite3_initialize() does any initialization. All other calls
# are harmless no-ops.)^
- #
+
# A call to sqlite3_shutdown() is an "effective" call if it is the first
# call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only
# an effective call to sqlite3_shutdown() does any deinitialization.
# All other valid calls to sqlite3_shutdown() are harmless no-ops.)^
- #
+
# The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()
# is not. The sqlite3_shutdown() interface must only be called from a
# single thread. All open (database connections) must be closed and all
# other SQLite resources must be deallocated prior to invoking
# sqlite3_shutdown().
- #
+
# Among other things, ^sqlite3_initialize() will invoke
# sqlite3_os_init(). Similarly, ^sqlite3_shutdown()
# will invoke sqlite3_os_end().
- #
+
# ^The sqlite3_initialize() routine returns (SQLITE_OK) on success.
# ^If for some reason, sqlite3_initialize() is unable to initialize
# the library (perhaps it is unable to allocate a needed resource such
# as a mutex) it returns an (error code) other than (SQLITE_OK).
- #
+
# ^The sqlite3_initialize() routine is called internally by many other
# SQLite interfaces so that an application usually does not need to
# invoke sqlite3_initialize() directly. For example, (sqlite3_open())
@@ -1134,7 +1129,7 @@ class Vfs < FFI::Struct
# of SQLite may require this. In other words, the behavior exhibited
# when SQLite is compiled with (SQLITE_OMIT_AUTOINIT) might become the
# default behavior in some future release of SQLite.
- #
+
# The sqlite3_os_init() routine does operating-system specific
# initialization of the SQLite library. The sqlite3_os_end()
# routine undoes the effect of sqlite3_os_init(). Typical tasks
@@ -1142,7 +1137,7 @@ class Vfs < FFI::Struct
# of static resources, initialization of global variables,
# setting up a default (sqlite3_vfs) module, or setting up
# a default configuration using (sqlite3_config()).
- #
+
# The application should never invoke either sqlite3_os_init()
# or sqlite3_os_end() directly. The application should only invoke
# sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init()
@@ -1157,41 +1152,37 @@ class Vfs < FFI::Struct
# implementation of sqlite3_os_init() or sqlite3_os_end()
# must return (SQLITE_OK) on success and some other (error code) upon
# failure.
- #
+
# @method initialize()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :initialize, :sqlite3_initialize, [], :int
-
# (Not documented)
- #
+
# @method shutdown()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :shutdown, :sqlite3_shutdown, [], :int
-
# (Not documented)
- #
+
# @method os_init()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :os_init, :sqlite3_os_init, [], :int
-
# (Not documented)
- #
+
# @method os_end()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :os_end, :sqlite3_os_end, [], :int
-
# CAPI3REF: Configuring The SQLite Library
- #
+
# The sqlite3_config() interface is used to make global configuration
# changes to SQLite in order to tune SQLite to the specific needs of
# the application. The default configuration is recommended for most
# applications and so this routine is usually not necessary. It is
# provided to support rare applications with unusual needs.
- #
+
# The sqlite3_config() interface is not threadsafe. The application
# must insure that no other SQLite interfaces are invoked by other
# threads while sqlite3_config() is running. Furthermore, sqlite3_config()
@@ -1201,50 +1192,48 @@ class Vfs < FFI::Struct
# (sqlite3_shutdown()) then it will return SQLITE_MISUSE.
# Note, however, that ^sqlite3_config() can be called as part of the
# implementation of an application-defined (sqlite3_os_init()).
- #
+
# The first argument to sqlite3_config() is an integer
# (configuration option) that determines
# what property of SQLite is to be configured. Subsequent arguments
# vary depending on the (configuration option)
# in the first argument.
- #
+
# ^When a configuration option is set, sqlite3_config() returns (SQLITE_OK).
# ^If the option is unknown or SQLite is unable to set the option
# then this routine returns a non-zero (error code).
- #
+
# @method config(int)
- # @param [Integer] int
- # @return [Integer]
+ # @param [Integer] int
+ # @return [Integer]
# @scope class
attach_function :config, :sqlite3_config, [:int], :int
-
# CAPI3REF: Configure database connections
- #
+
# The sqlite3_db_config() interface is used to make configuration
# changes to a (database connection). The interface is similar to
# (sqlite3_config()) except that the changes apply to a single
# (database connection) (specified in the first argument).
- #
+
# The second argument to sqlite3_db_config(D,V,...) is the
# (SQLITE_DBCONFIG_LOOKASIDE | configuration verb) - an integer code
# that indicates what aspect of the (database connection) is being configured.
# Subsequent arguments vary depending on the configuration verb.
- #
+
# ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
# the call is considered successful.
- #
+
# @method db_config(sqlite3, op)
- # @param [Sqlite3] sqlite3
- # @param [Integer] op
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [Integer] op
+ # @return [Integer]
# @scope class
attach_function :db_config, :sqlite3_db_config, [Sqlite3, :int], :int
-
# CAPI3REF: Memory Allocation Routines
- #
+
# An instance of this object defines the interface between SQLite
# and low-level memory allocation routines.
- #
+
# This object is used in only one place in the SQLite interface.
# A pointer to an instance of this object is the argument to
# (sqlite3_config()) when the configuration option is
@@ -1254,7 +1243,7 @@ class Vfs < FFI::Struct
# during configuration, an application can specify an alternative
# memory allocation subsystem for SQLite to use for all of its
# dynamic memory needs.
- #
+
# Note that SQLite comes with several (built-in memory allocators)
# that are perfectly adequate for the overwhelming majority of applications
# and that this object is only useful to a tiny minority of applications
@@ -1263,16 +1252,16 @@ class Vfs < FFI::Struct
# memory allocator that simulates memory out-of-memory conditions in
# order to verify that SQLite recovers gracefully from such
# conditions.
- #
+
# The xMalloc, xRealloc, and xFree methods must work like the
# malloc(), realloc() and free() functions from the standard C library.
# ^SQLite guarantees that the second argument to
# xRealloc is always a value returned by a prior call to xRoundup.
- #
+
# xSize should return the allocated size of a memory allocation
# previously obtained from xMalloc or xRealloc. The allocated size
# is always at least as big as the requested size but may be larger.
- #
+
# The xRoundup method returns what would be the allocated size of
# a memory allocation given a particular requested size. Most memory
# allocators round up memory allocations at least to the next multiple
@@ -1280,14 +1269,14 @@ class Vfs < FFI::Struct
# Every memory allocation request coming in through (sqlite3_malloc())
# or (sqlite3_realloc()) first calls xRoundup. If xRoundup returns 0,
# that causes the corresponding memory allocation to fail.
- #
+
# The xInit method initializes the memory allocator. (For example,
# it might allocate any require mutexes or initialize internal data
# structures. The xShutdown method is invoked (indirectly) by
# (sqlite3_shutdown()) and should deallocate any resources acquired
# by xInit. The pAppData pointer is used as the only parameter to
# xInit and xShutdown.
- #
+
# SQLite holds the (SQLITE_MUTEX_STATIC_MASTER) mutex when it invokes
# the xInit method, so the xInit method need not be threadsafe. The
# xShutdown method is only called from (sqlite3_shutdown()) so it does
@@ -1298,25 +1287,25 @@ class Vfs < FFI::Struct
# However, if (SQLITE_CONFIG_MEMSTATUS) is disabled, then the other
# methods must be threadsafe or else make their own arrangements for
# serialization.
- #
+
# SQLite will never invoke xInit() more than once without an intervening
# call to xShutdown().
- #
+
# = Fields:
# :x_malloc ::
- # (FFI::Pointer(*)) Memory allocation function
+ # (FFI::Pointer(*FunctionProto)) Memory allocation function
# :x_free ::
- # (FFI::Pointer(*)) Free a prior allocation
+ # (FFI::Pointer(*FunctionProto)) Free a prior allocation
# :x_realloc ::
- # (FFI::Pointer(*)) Resize an allocation
+ # (FFI::Pointer(*FunctionProto)) Resize an allocation
# :x_size ::
- # (FFI::Pointer(*)) Return the size of an allocation
+ # (FFI::Pointer(*FunctionProto)) Return the size of an allocation
# :x_roundup ::
- # (FFI::Pointer(*)) Round up request size to allocation size
+ # (FFI::Pointer(*FunctionProto)) Round up request size to allocation size
# :x_init ::
- # (FFI::Pointer(*)) Initialize the memory allocator
+ # (FFI::Pointer(*FunctionProto)) Initialize the memory allocator
# :x_shutdown ::
- # (FFI::Pointer(*)) Deinitialize the memory allocator
+ # (FFI::Pointer(*FunctionProto)) Deinitialize the memory allocator
# :p_app_data ::
# (FFI::Pointer(*Void)) Argument to xInit() and xShutdown()
class MemMethods < FFI::Struct
@@ -1329,43 +1318,42 @@ class MemMethods < FFI::Struct
:x_shutdown, :pointer,
:p_app_data, :pointer
end
-
+
# CAPI3REF: Enable Or Disable Extended Result Codes
- #
+
# ^The sqlite3_extended_result_codes() routine enables or disables the
# (extended result codes) feature of SQLite. ^The extended result
# codes are disabled by default for historical compatibility.
- #
+
# @method extended_result_codes(sqlite3, onoff)
- # @param [Sqlite3] sqlite3
- # @param [Integer] onoff
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [Integer] onoff
+ # @return [Integer]
# @scope class
attach_function :extended_result_codes, :sqlite3_extended_result_codes, [Sqlite3, :int], :int
-
# CAPI3REF: Last Insert Rowid
- #
+
# ^Each entry in an SQLite table has a unique 64-bit signed
# integer key called the (ROWID | "rowid"). ^The rowid is always available
# as an undeclared column named ROWID, OID, or _ROWID_ as long as those
# names are not also used by explicitly declared columns. ^If
# the table has a column of type (INTEGER PRIMARY KEY) then that column
# is another alias for the rowid.
- #
+
# ^This routine returns the (rowid) of the most recent
# successful (INSERT) into the database from the (database connection)
# in the first argument. ^As of SQLite version 3.7.7, this routines
# records the last insert rowid of both ordinary tables and (virtual tables).
# ^If no successful (INSERT)s
# have ever occurred on that database connection, zero is returned.
- #
+
# ^(If an (INSERT) occurs within a trigger or within a (virtual table)
# method, then this routine will return the (rowid) of the inserted
# row as long as the trigger or virtual table method is running.
# But once the trigger or virtual table method ends, the value returned
# by this routine reverts to what it was before the trigger or virtual
# table method began.)^
- #
+
# ^An (INSERT) that fails due to a constraint violation is not a
# successful (INSERT) and does not change the value returned by this
# routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
@@ -1375,28 +1363,27 @@ class MemMethods < FFI::Struct
# INSERT continues to completion after deleting rows that caused
# the constraint problem so INSERT OR REPLACE will always change
# the return value of this interface.)^
- #
+
# ^For the purposes of this routine, an (INSERT) is considered to
# be successful even if it is subsequently rolled back.
- #
+
# This function is accessible to SQL statements via the
# (last_insert_rowid() SQL function).
- #
+
# If a separate thread performs a new (INSERT) on the same
# database connection while the (sqlite3_last_insert_rowid())
# function is running and thus changes the last insert (rowid),
# then the value returned by (sqlite3_last_insert_rowid()) is
# unpredictable and might not equal either the old or the new
# last insert (rowid).
- #
+
# @method last_insert_rowid(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @return [Integer]
# @scope class
attach_function :last_insert_rowid, :sqlite3_last_insert_rowid, [Sqlite3], :long_long
-
# CAPI3REF: Count The Number Of Rows Modified
- #
+
# ^This function returns the number of database rows that were changed
# or inserted or deleted by the most recently completed SQL statement
# on the (database connection) specified by the first parameter.
@@ -1405,16 +1392,16 @@ class MemMethods < FFI::Struct
# triggers or (foreign key actions) are not counted.)^ Use the
# (sqlite3_total_changes()) function to find the total number of changes
# including changes caused by triggers and foreign key actions.
- #
+
# ^Changes to a view that are simulated by an (INSTEAD OF trigger)
# are not counted. Only real table changes are counted.
- #
+
# ^(A "row change" is a change to a single row of a single table
# caused by an INSERT, DELETE, or UPDATE statement. Rows that
# are changed as side effects of (REPLACE) constraint resolution,
# rollback, ABORT processing, (DROP TABLE), or by any other
# mechanisms do not count as direct row changes.)^
- #
+
# A "trigger context" is a scope of execution that begins and
# ends with the script of a (CREATE TRIGGER | trigger).
# Most SQL statements are
@@ -1422,14 +1409,14 @@ class MemMethods < FFI::Struct
# trigger context. If a trigger fires from the top level, a
# new trigger context is entered for the duration of that one
# trigger. Subtriggers create subcontexts for their duration.
- #
+
# ^Calling (sqlite3_exec()) or (sqlite3_step()) recursively does
# not create a new trigger context.
- #
+
# ^This function returns the number of direct row changes in the
# most recent INSERT, UPDATE, or DELETE statement within the same
# trigger context.
- #
+
# ^Thus, when called from the top level, this function returns the
# number of changes in the most recent INSERT, UPDATE, or DELETE
# that also occurred at the top level. ^(Within the body of a trigger,
@@ -1438,22 +1425,21 @@ class MemMethods < FFI::Struct
# statement within the body of the same trigger.
# However, the number returned does not include changes
# caused by subtriggers since those have their own context.)^
- #
+
# See also the (sqlite3_total_changes()) interface, the
# (count_changes pragma), and the (changes() SQL function).
- #
+
# If a separate thread makes changes on the same database connection
# while (sqlite3_changes()) is running then the value returned
# is unpredictable and not meaningful.
- #
+
# @method changes(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @return [Integer]
# @scope class
attach_function :changes, :sqlite3_changes, [Sqlite3], :int
-
# CAPI3REF: Total Number Of Rows Modified
- #
+
# ^This function returns the number of row changes caused by (INSERT),
# (UPDATE) or (DELETE) statements since the (database connection) was opened.
# ^(The count returned by sqlite3_total_changes() includes all changes
@@ -1467,42 +1453,41 @@ class MemMethods < FFI::Struct
# ^The sqlite3_total_changes() function counts the changes as soon as
# the statement that makes them is completed (when the statement handle
# is passed to (sqlite3_reset()) or (sqlite3_finalize())).
- #
+
# See also the (sqlite3_changes()) interface, the
# (count_changes pragma), and the (total_changes() SQL function).
- #
+
# If a separate thread makes changes on the same database connection
# while (sqlite3_total_changes()) is running then the value
# returned is unpredictable and not meaningful.
- #
+
# @method total_changes(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @return [Integer]
# @scope class
attach_function :total_changes, :sqlite3_total_changes, [Sqlite3], :int
-
# CAPI3REF: Interrupt A Long-Running Query
- #
+
# ^This function causes any pending database operation to abort and
# return at its earliest opportunity. This routine is typically
# called in response to a user action such as pressing "Cancel"
# or Ctrl-C where the user wants a long query operation to halt
# immediately.
- #
+
# ^It is safe to call this routine from a thread different from the
# thread that is currently running the database operation. But it
# is not safe to call this routine with a (database connection) that
# is closed or might close before sqlite3_interrupt() returns.
- #
+
# ^If an SQL operation is very nearly finished at the time when
# sqlite3_interrupt() is called, then it might not have an opportunity
# to be interrupted and might continue to completion.
- #
+
# ^An SQL operation that is interrupted will return (SQLITE_INTERRUPT).
# ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE
# that is inside an explicit transaction, then the entire transaction
# will be rolled back automatically.
- #
+
# ^The sqlite3_interrupt(D) call is in effect until all currently running
# SQL statements on (database connection) D complete. ^Any new SQL statements
# that are started after the sqlite3_interrupt() call and before the
@@ -1513,18 +1498,17 @@ class MemMethods < FFI::Struct
# ^A call to sqlite3_interrupt(D) that occurs when there are no running
# SQL statements is a no-op and has no effect on SQL statements
# that are started after the sqlite3_interrupt() call returns.
- #
+
# If the database connection closes while (sqlite3_interrupt())
# is running then bad things will likely happen.
- #
+
# @method interrupt(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [nil]
+ # @param [Sqlite3] sqlite3
+ # @return [nil]
# @scope class
attach_function :interrupt, :sqlite3_interrupt, [Sqlite3], :void
-
# CAPI3REF: Determine If An SQL Statement Is Complete
- #
+
# These routines are useful during command-line input to determine if the
# currently entered text seems to form a complete SQL statement or
# if additional input is needed before sending the text into
@@ -1536,49 +1520,47 @@ class MemMethods < FFI::Struct
# independent tokens (they are part of the token in which they are
# embedded) and thus do not count as a statement terminator. ^Whitespace
# and comments that follow the final semicolon are ignored.
- #
+
# ^These routines return 0 if the statement is incomplete. ^If a
# memory allocation fails, then SQLITE_NOMEM is returned.
- #
+
# ^These routines do not parse the SQL statements thus
# will not detect syntactically incorrect SQL.
- #
+
# ^(If SQLite has not been initialized using (sqlite3_initialize()) prior
# to invoking sqlite3_complete16() then sqlite3_initialize() is invoked
# automatically by sqlite3_complete16(). If that initialization fails,
# then the return value from sqlite3_complete16() will be non-zero
# regardless of whether or not the input SQL is complete.)^
- #
+
# The input to (sqlite3_complete()) must be a zero-terminated
# UTF-8 string.
- #
+
# The input to (sqlite3_complete16()) must be a zero-terminated
# UTF-16 string in native byte order.
- #
+
# @method complete(sql)
- # @param [String] sql
- # @return [Integer]
+ # @param [String] sql
+ # @return [Integer]
# @scope class
attach_function :complete, :sqlite3_complete, [:string], :int
-
# (Not documented)
- #
+
# @method complete16(sql)
- # @param [FFI::Pointer(*Void)] sql
- # @return [Integer]
+ # @param [FFI::Pointer(*Void)] sql
+ # @return [Integer]
# @scope class
attach_function :complete16, :sqlite3_complete16, [:pointer], :int
-
# CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
- #
+
# ^This routine sets a callback function that might be invoked whenever
# an attempt is made to open a database table that another thread
# or process has locked.
- #
+
# ^If the busy callback is NULL, then (SQLITE_BUSY) or (SQLITE_IOERR_BLOCKED)
# is returned immediately upon encountering the lock. ^If the busy callback
# is not NULL, then the callback might be invoked with two arguments.
- #
+
# ^The first argument to the busy handler is a copy of the void* pointer which
# is the third argument to sqlite3_busy_handler(). ^The second argument to
# the busy handler callback is the number of times that the busy handler has
@@ -1587,7 +1569,7 @@ class MemMethods < FFI::Struct
# access the database and (SQLITE_BUSY) or (SQLITE_IOERR_BLOCKED) is returned.
# ^If the callback returns non-zero, then another attempt
# is made to open the database for reading and the cycle repeats.
- #
+
# The presence of a busy handler does not guarantee that it will be invoked
# when there is lock contention. ^If SQLite determines that invoking the busy
# handler could result in a deadlock, it will go ahead and return (SQLITE_BUSY)
@@ -1602,9 +1584,9 @@ class MemMethods < FFI::Struct
# SQLite returns (SQLITE_BUSY) for the first process, hoping that this
# will induce the first process to release its read lock and allow
# the second process to proceed.
- #
+
# ^The default busy callback is NULL.
- #
+
# ^The (SQLITE_BUSY) error is converted to (SQLITE_IOERR_BLOCKED)
# when SQLite is in the middle of a large transaction where all the
# changes will not fit into the in-memory cache. SQLite will
@@ -1619,79 +1601,77 @@ class MemMethods < FFI::Struct
#
# CorruptionFollowingBusyError wiki page for a discussion of why
# this is important.
- #
+
# ^(There can only be a single busy handler defined for each
# (database connection). Setting a new busy handler clears any
# previously set handler.)^ ^Note that calling (sqlite3_busy_timeout())
# will also set or clear the busy handler.
- #
+
# The busy callback should not take any actions which modify the
# database connection that invoked the busy handler. Any such actions
# result in undefined behavior.
- #
+
# A busy handler must not close the database connection
# or (prepared statement) that invoked the busy handler.
- #
- # @method busy_handler(sqlite3, , void)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*)]
- # @param [FFI::Pointer(*Void)] void
- # @return [Integer]
+
+ # @method busy_handler(sqlite3, functionproto, void)
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @param [FFI::Pointer(*Void)] void
+ # @return [Integer]
# @scope class
attach_function :busy_handler, :sqlite3_busy_handler, [Sqlite3, :pointer, :pointer], :int
-
# CAPI3REF: Set A Busy Timeout
- #
+
# ^This routine sets a (sqlite3_busy_handler | busy handler) that sleeps
# for a specified amount of time when a table is locked. ^The handler
# will sleep multiple times until at least "ms" milliseconds of sleeping
# have accumulated. ^After at least "ms" milliseconds of sleeping,
# the handler returns 0 which causes (sqlite3_step()) to return
# (SQLITE_BUSY) or (SQLITE_IOERR_BLOCKED).
- #
+
# ^Calling this routine with an argument less than or equal to zero
# turns off all busy handlers.
- #
+
# ^(There can only be a single busy handler for a particular
# (database connection) any any given moment. If another busy handler
# was defined (using (sqlite3_busy_handler())) prior to calling
# this routine, that other busy handler is cleared.)^
- #
+
# @method busy_timeout(sqlite3, ms)
- # @param [Sqlite3] sqlite3
- # @param [Integer] ms
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [Integer] ms
+ # @return [Integer]
# @scope class
attach_function :busy_timeout, :sqlite3_busy_timeout, [Sqlite3, :int], :int
-
# CAPI3REF: Convenience Routines For Running Queries
- #
+
# This is a legacy interface that is preserved for backwards compatibility.
# Use of this interface is not recommended.
- #
+
# Definition: A result table is memory data structure created by the
# (sqlite3_get_table()) interface. A result table records the
# complete query results from one or more queries.
- #
+
# The table conceptually has a number of rows and columns. But
# these numbers are not part of the result table itself. These
# numbers are obtained separately. Let N be the number of rows
# and M be the number of columns.
- #
+
# A result table is an array of pointers to zero-terminated UTF-8 strings.
# There are (N+1)*M elements in the array. The first M pointers point
# to zero-terminated strings that contain the names of the columns.
# The remaining entries all point to query results. NULL values result
# in NULL pointers. All other values are in their UTF-8 zero-terminated
# string representation as returned by (sqlite3_column_text()).
- #
+
# A result table might consist of one or more memory allocations.
# It is not safe to pass a result table directly to (sqlite3_free()).
# A result table should be deallocated using (sqlite3_free_table()).
- #
+
# ^(As an example of the result table format, suppose a query result
# is as follows:
- #
+
#
# Name | Age
# -----------------------
@@ -1699,11 +1679,11 @@ class MemMethods < FFI::Struct
# Bob | 28
# Cindy | 21
#
- #
+
# There are two column (M==2) and three rows (N==3). Thus the
# result table has 8 entries. Suppose the result table is stored
# in an array names azResult. Then azResult holds this content:
- #
+
#
# azResult[0) = "Name";
# azResult[1) = "Age";
@@ -1714,19 +1694,19 @@ class MemMethods < FFI::Struct
# azResult[6) = "Cindy";
# azResult[7) = "21";
#
)^
- #
+
# ^The sqlite3_get_table() function evaluates one or more
# semicolon-separated SQL statements in the zero-terminated UTF-8
# string of its 2nd parameter and returns a result table to the
# pointer given in its 3rd parameter.
- #
+
# After the application has finished with the result from sqlite3_get_table(),
# it must pass the result table pointer to sqlite3_free_table() in order to
# release the memory that was malloced. Because of the way the
# (sqlite3_malloc()) happens within sqlite3_get_table(), the calling
# function must not try to call (sqlite3_free()) directly. Only
# (sqlite3_free_table()) is able to release the memory properly and safely.
- #
+
# The sqlite3_get_table() interface is implemented as a wrapper around
# (sqlite3_exec()). The sqlite3_get_table() routine does not have access
# to any internal data structures of SQLite. It uses only the public
@@ -1734,38 +1714,36 @@ class MemMethods < FFI::Struct
# wrapper layer outside of the internal (sqlite3_exec()) call are not
# reflected in subsequent calls to (sqlite3_errcode()) or
# (sqlite3_errmsg()).
- #
+
# @method get_table(db, z_sql, paz_result, pn_row, pn_column, pz_errmsg)
- # @param [Sqlite3] db
- # @param [String] z_sql
- # @param [FFI::Pointer(***CharS)] paz_result
- # @param [FFI::Pointer(*Int)] pn_row
- # @param [FFI::Pointer(*Int)] pn_column
- # @param [FFI::Pointer(**CharS)] pz_errmsg
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_sql
+ # @param [FFI::Pointer(***CharS)] paz_result
+ # @param [FFI::Pointer(*Int)] pn_row
+ # @param [FFI::Pointer(*Int)] pn_column
+ # @param [FFI::Pointer(**CharS)] pz_errmsg
+ # @return [Integer]
# @scope class
attach_function :get_table, :sqlite3_get_table, [Sqlite3, :string, :pointer, :pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method free_table(result)
- # @param [FFI::Pointer(**CharS)] result
- # @return [nil]
+ # @param [FFI::Pointer(**CharS)] result
+ # @return [nil]
# @scope class
attach_function :free_table, :sqlite3_free_table, [:pointer], :void
-
# CAPI3REF: Formatted String Printing Functions
- #
+
# These routines are work-alikes of the "printf()" family of functions
# from the standard C library.
- #
+
# ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their
# results into memory obtained from (sqlite3_malloc()).
# The strings returned by these two routines should be
# released by (sqlite3_free()). ^Both routines return a
# NULL pointer if (sqlite3_malloc()) is unable to allocate enough
# memory to hold the resulting string.
- #
+
# ^(The sqlite3_snprintf() routine is similar to "snprintf()" from
# the standard C library. The result is written into the
# buffer supplied as the second parameter whose size is given by
@@ -1778,125 +1756,123 @@ class MemMethods < FFI::Struct
# the number of characters written would be a more useful return
# value but we cannot change the implementation of sqlite3_snprintf()
# now without breaking compatibility.
- #
+
# ^As long as the buffer size is greater than zero, sqlite3_snprintf()
# guarantees that the buffer is always zero-terminated. ^The first
# parameter "n" is the total size of the buffer, including space for
# the zero terminator. So the longest string that can be completely
# written will be n-1 characters.
- #
+
# ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().
- #
+
# These routines all implement some additional formatting
# options that are useful for constructing SQL statements.
# All of the usual printf() formatting options apply. In addition, there
# is are "%q", "%Q", and "%z" options.
- #
+
# ^(The %q option works like %s in that it substitutes a null-terminated
# string from the argument list. But %q also doubles every '\'' character.
# %q is designed for use inside a string literal.)^ By doubling each '\''
# character it escapes that character and allows it to be inserted into
# the string.
- #
+
# For example, assume the string variable zText contains text as follows:
- #
+
#
# char *zText = "It's a happy day!";
#
- #
+
# One can use this text in an SQL statement as follows:
- #
+
#
# char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
# sqlite3_exec(db, zSQL, 0, 0, 0);
# sqlite3_free(zSQL);
#
- #
+
# Because the %q format string is used, the '\'' character in zText
# is escaped and the SQL generated is as follows:
- #
+
#
# INSERT INTO table1 VALUES('It''s a happy day!')
#
- #
+
# This is correct. Had we used %s instead of %q, the generated SQL
# would have looked like this:
- #
+
#
# INSERT INTO table1 VALUES('It's a happy day!');
#
- #
+
# This second example is an SQL syntax error. As a general rule you should
# always use %q instead of %s when inserting text into a string literal.
- #
+
# ^(The %Q option works like %q except it also adds single quotes around
# the outside of the total string. Additionally, if the parameter in the
# argument list is a NULL pointer, %Q substitutes the text "NULL" (without
# single quotes).)^ So, for example, one could say:
- #
+
#
# char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
# sqlite3_exec(db, zSQL, 0, 0, 0);
# sqlite3_free(zSQL);
#
- #
+
# The code above will render a correct SQL statement in the zSQL
# variable even if the zText variable is a NULL pointer.
- #
+
# ^(The "%z" formatting option works like "%s" but with the
# addition that after the string has been read and copied into
# the result, (sqlite3_free()) is called on the input string.)^
- #
+
# @method mprintf(string)
- # @param [String] string
- # @return [String]
+ # @param [String] string
+ # @return [String]
# @scope class
attach_function :mprintf, :sqlite3_mprintf, [:string], :string
-
# (Not documented)
- #
- # @method vmprintf(string, va_list_tag)
- # @param [String] string
- # @param [FFI::Pointer(*VaListTag)] va_list_tag
- # @return [String]
- # @scope class
- attach_function :vmprintf, :sqlite3_vmprintf, [:string, :pointer], :string
-
+
+ # @method vmprintf(string, va_list)
+ # @param [String] string
+ # @param [Integer] va_list
+ # @return [String]
+ # @scope class
+ # FAILED FFI WRAPPER GENERATION --| vmprintf - Error: Cannot attach_function for :sqlite3_vmprintf with signature [:string, :int], :string
+ # FAILED FFI WRAPPER GENERATION --| vmprintf - Error: Found macro 'va_list' which cannot be parsed easily. This 'va_list' macro would require compilation to determine full type information.
# (Not documented)
- #
+
# @method snprintf(int, string, string)
- # @param [Integer] int
- # @param [String] string
- # @param [String] string
- # @return [String]
+ # @param [Integer] int
+ # @param [String] string
+ # @param [String] string
+ # @return [String]
# @scope class
attach_function :snprintf, :sqlite3_snprintf, [:int, :string, :string], :string
-
# (Not documented)
- #
- # @method vsnprintf(int, string, string, va_list_tag)
- # @param [Integer] int
- # @param [String] string
- # @param [String] string
- # @param [FFI::Pointer(*VaListTag)] va_list_tag
- # @return [String]
- # @scope class
- attach_function :vsnprintf, :sqlite3_vsnprintf, [:int, :string, :string, :pointer], :string
-
+
+ # @method vsnprintf(int, string, string, va_list)
+ # @param [Integer] int
+ # @param [String] string
+ # @param [String] string
+ # @param [Integer] va_list
+ # @return [String]
+ # @scope class
+ # FAILED FFI WRAPPER GENERATION --| vsnprintf - Error: Cannot attach_function for :sqlite3_vsnprintf with signature [:int, :string, :string, :int], :string
+ # FAILED FFI WRAPPER GENERATION --| vsnprintf - Error: Found macro 'va_list' which cannot be parsed easily. This 'va_list' macro would require compilation to determine full type information.
# CAPI3REF: Memory Allocation Subsystem
- #
+
# The SQLite core uses these three routines for all of its own
# internal memory allocation needs. "Core" in the previous sentence
# does not include operating-system specific VFS implementation. The
# Windows VFS uses native malloc() and free() for some operations.
- #
+
# ^The sqlite3_malloc() routine returns a pointer to a block
# of memory at least N bytes in length, where N is the parameter.
# ^If sqlite3_malloc() is unable to obtain sufficient free
# memory, it returns a NULL pointer. ^If the parameter N to
# sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
# a NULL pointer.
- #
+
# ^Calling sqlite3_free() with a pointer previously returned
# by sqlite3_malloc() or sqlite3_realloc() releases that memory so
# that it might be reused. ^The sqlite3_free() routine is
@@ -1907,7 +1883,7 @@ class MemMethods < FFI::Struct
# Memory corruption, a segmentation fault, or other severe error
# might result if sqlite3_free() is called with a non-NULL pointer that
# was not obtained from sqlite3_malloc() or sqlite3_realloc().
- #
+
# ^(The sqlite3_realloc() interface attempts to resize a
# prior memory allocation to be at least N bytes, where N is the
# second parameter. The memory allocation to be resized is the first
@@ -1924,17 +1900,17 @@ class MemMethods < FFI::Struct
# by sqlite3_realloc() and the prior allocation is freed.
# ^If sqlite3_realloc() returns NULL, then the prior allocation
# is not freed.
- #
+
# ^The memory returned by sqlite3_malloc() and sqlite3_realloc()
# is always aligned to at least an 8 byte boundary, or to a
# 4 byte boundary if the (SQLITE_4_BYTE_ALIGNED_MALLOC) compile-time
# option is used.
- #
+
# In SQLite version 3.5.0 and 3.5.1, it was possible to define
# the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
# implementation of these routines to be omitted. That capability
# is no longer provided. Only built-in memory allocators can be used.
- #
+
# The Windows OS interface layer calls
# the system malloc() and free() directly when converting
# filenames between the UTF-8 encoding used by SQLite
@@ -1942,45 +1918,42 @@ class MemMethods < FFI::Struct
# installation. Memory allocation errors are detected, but
# they are reported back as (SQLITE_CANTOPEN) or
# (SQLITE_IOERR) rather than (SQLITE_NOMEM).
- #
+
# The pointer arguments to (sqlite3_free()) and (sqlite3_realloc())
# must be either NULL or else pointers obtained from a prior
# invocation of (sqlite3_malloc()) or (sqlite3_realloc()) that have
# not yet been released.
- #
+
# The application must not read or write any part of
# a block of memory after it has been released using
# (sqlite3_free()) or (sqlite3_realloc()).
- #
+
# @method malloc(int)
- # @param [Integer] int
- # @return [FFI::Pointer(*Void)]
+ # @param [Integer] int
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :malloc, :sqlite3_malloc, [:int], :pointer
-
# (Not documented)
- #
+
# @method realloc(void, int)
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] int
- # @return [FFI::Pointer(*Void)]
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] int
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :realloc, :sqlite3_realloc, [:pointer, :int], :pointer
-
# (Not documented)
- #
+
# @method free(void)
- # @param [FFI::Pointer(*Void)] void
- # @return [nil]
+ # @param [FFI::Pointer(*Void)] void
+ # @return [nil]
# @scope class
attach_function :free, :sqlite3_free, [:pointer], :void
-
# CAPI3REF: Memory Allocator Statistics
- #
+
# SQLite provides these two interfaces for reporting on the status
# of the (sqlite3_malloc()), (sqlite3_free()), and (sqlite3_realloc())
# routines, which form the built-in memory allocation subsystem.
- #
+
# ^The (sqlite3_memory_used()) routine returns the number of bytes
# of memory currently outstanding (malloced but not freed).
# ^The (sqlite3_memory_highwater()) routine returns the maximum
@@ -1990,52 +1963,49 @@ class MemMethods < FFI::Struct
# added by SQLite in its implementation of (sqlite3_malloc()),
# but not overhead added by the any underlying system library
# routines that (sqlite3_malloc()) may call.
- #
+
# ^The memory high-water mark is reset to the current value of
# (sqlite3_memory_used()) if and only if the parameter to
# (sqlite3_memory_highwater()) is true. ^The value returned
# by (sqlite3_memory_highwater(1)) is the high-water mark
# prior to the reset.
- #
+
# @method memory_used()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :memory_used, :sqlite3_memory_used, [], :long_long
-
# (Not documented)
- #
+
# @method memory_highwater(reset_flag)
- # @param [Integer] reset_flag
- # @return [Integer]
+ # @param [Integer] reset_flag
+ # @return [Integer]
# @scope class
attach_function :memory_highwater, :sqlite3_memory_highwater, [:int], :long_long
-
# CAPI3REF: Pseudo-Random Number Generator
- #
+
# SQLite contains a high-quality pseudo-random number generator (PRNG) used to
# select random (ROWID | ROWIDs) when inserting new records into a table that
# already uses the largest possible (ROWID). The PRNG is also used for
# the build-in random() and randomblob() SQL functions. This interface allows
# applications to access the same PRNG for other purposes.
- #
+
# ^A call to this routine stores N bytes of randomness into buffer P.
- #
+
# ^The first time this routine is invoked (either internally or by
# the application) the PRNG is seeded using randomness obtained
# from the xRandomness method of the default (sqlite3_vfs) object.
# ^On all subsequent invocations, the pseudo-randomness is generated
# internally and without recourse to the (sqlite3_vfs) xRandomness
# method.
- #
+
# @method randomness(n, p)
- # @param [Integer] n
- # @param [FFI::Pointer(*Void)] p
- # @return [nil]
+ # @param [Integer] n
+ # @param [FFI::Pointer(*Void)] p
+ # @return [nil]
# @scope class
attach_function :randomness, :sqlite3_randomness, [:int, :pointer], :void
-
# CAPI3REF: Compile-Time Authorization Callbacks
- #
+
# ^This routine registers an authorizer callback with a particular
# (database connection), supplied in the first argument.
# ^The authorizer callback is invoked as SQL statements are being compiled
@@ -2051,20 +2021,20 @@ class MemMethods < FFI::Struct
# any value other than (SQLITE_IGNORE), (SQLITE_OK), or (SQLITE_DENY)
# then the (sqlite3_prepare_v2()) or equivalent call that triggered
# the authorizer will fail with an error message.
- #
+
# When the callback returns (SQLITE_OK), that means the operation
# requested is ok. ^When the callback returns (SQLITE_DENY), the
# (sqlite3_prepare_v2()) or equivalent call that triggered the
# authorizer will fail with an error message explaining that
# access is denied.
- #
+
# ^The first parameter to the authorizer callback is a copy of the third
# parameter to the sqlite3_set_authorizer() interface. ^The second parameter
# to the callback is an integer (SQLITE_COPY | action code) that specifies
# the particular action to be authorized. ^The third through sixth parameters
# to the callback are zero-terminated strings that contain additional
# details about the action to be authorized.
- #
+
# ^If the action code is (SQLITE_READ)
# and the callback returns (SQLITE_IGNORE) then the
# (prepared statement) statement is constructed to substitute
@@ -2075,7 +2045,7 @@ class MemMethods < FFI::Struct
# ^If the action code is (SQLITE_DELETE) and the callback returns
# (SQLITE_IGNORE) then the (DELETE) operation proceeds but the
# (truncate optimization) is disabled and all rows are deleted individually.
- #
+
# An authorizer is used when (sqlite3_prepare | preparing)
# SQL statements from an untrusted source, to ensure that the SQL statements
# do not try to access data they are not allowed to see, or that they do not
@@ -2086,46 +2056,45 @@ class MemMethods < FFI::Struct
# database. An authorizer could then be put in place while the
# user-entered SQL is being (sqlite3_prepare | prepared) that
# disallows everything except (SELECT) statements.
- #
+
# Applications that need to process SQL from untrusted sources
# might also consider lowering resource limits using (sqlite3_limit())
# and limiting database size using the (max_page_count) (PRAGMA)
# in addition to using an authorizer.
- #
+
# ^(Only a single authorizer can be in place on a database connection
# at a time. Each call to sqlite3_set_authorizer overrides the
# previous call.)^ ^Disable the authorizer by installing a NULL callback.
# The authorizer is disabled by default.
- #
+
# The authorizer callback must not do anything that will modify
# the database connection that invoked the authorizer callback.
# Note that (sqlite3_prepare_v2()) and (sqlite3_step()) both modify their
# database connections for the meaning of "modify" in this paragraph.
- #
+
# ^When (sqlite3_prepare_v2()) is used to prepare a statement, the
# statement might be re-prepared during (sqlite3_step()) due to a
# schema change. Hence, the application should ensure that the
# correct authorizer callback remains in place during the (sqlite3_step()).
- #
+
# ^Note that the authorizer callback is invoked only during
# (sqlite3_prepare()) or its variants. Authorization is not
# performed during statement evaluation in (sqlite3_step()), unless
# as stated in the previous paragraph, sqlite3_step() invokes
# sqlite3_prepare_v2() to reprepare a statement after a schema change.
- #
+
# @method set_authorizer(sqlite3, x_auth, p_user_data)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*)] x_auth
- # @param [FFI::Pointer(*Void)] p_user_data
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*FunctionProto)] x_auth
+ # @param [FFI::Pointer(*Void)] p_user_data
+ # @return [Integer]
# @scope class
attach_function :set_authorizer, :sqlite3_set_authorizer, [Sqlite3, :pointer, :pointer], :int
-
# CAPI3REF: Tracing And Profiling Functions
- #
+
# These routines register callback functions that can be used for
# tracing and profiling the execution of SQL statements.
- #
+
# ^The callback function registered by sqlite3_trace() is invoked at
# various times when an SQL statement is being run by (sqlite3_step()).
# ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the
@@ -2133,7 +2102,7 @@ class MemMethods < FFI::Struct
# ^(Additional sqlite3_trace() callbacks might occur
# as each triggered subprogram is entered. The callbacks for triggers
# contain a UTF-8 SQL comment that identifies the trigger.)^
- #
+
# ^The callback function registered by sqlite3_profile() is invoked
# as each SQL statement finishes. ^The profile callback contains
# the original statement text and an estimate of wall-clock time
@@ -2144,64 +2113,61 @@ class MemMethods < FFI::Struct
# might provide greater resolution on the profiler callback. The
# sqlite3_profile() function is considered experimental and is
# subject to change in future versions of SQLite.
- #
+
# @method trace(sqlite3, x_trace, void)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*)] x_trace
- # @param [FFI::Pointer(*Void)] void
- # @return [FFI::Pointer(*Void)]
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*FunctionProto)] x_trace
+ # @param [FFI::Pointer(*Void)] void
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :trace, :sqlite3_trace, [Sqlite3, :pointer, :pointer], :pointer
-
# (Not documented)
- #
+
# @method profile(sqlite3, x_profile, void)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*)] x_profile
- # @param [FFI::Pointer(*Void)] void
- # @return [FFI::Pointer(*Void)]
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*FunctionProto)] x_profile
+ # @param [FFI::Pointer(*Void)] void
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :profile, :sqlite3_profile, [Sqlite3, :pointer, :pointer], :pointer
-
# CAPI3REF: Query Progress Callbacks
- #
+
# ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback
# function X to be invoked periodically during long running calls to
# (sqlite3_exec()), (sqlite3_step()) and (sqlite3_get_table()) for
# database connection D. An example use for this
# interface is to keep a GUI updated during a large query.
- #
+
# ^The parameter P is passed through as the only parameter to the
# callback function X. ^The parameter N is the number of
# (virtual machine instructions) that are evaluated between successive
# invocations of the callback X.
- #
+
# ^Only a single progress handler may be defined at one time per
# (database connection); setting a new progress handler cancels the
# old one. ^Setting parameter X to NULL disables the progress handler.
# ^The progress handler is also disabled by setting N to a value less
# than 1.
- #
+
# ^If the progress callback returns non-zero, the operation is
# interrupted. This feature can be used to implement a
# "Cancel" button on a GUI progress dialog box.
- #
+
# The progress handler callback must not do anything that will modify
# the database connection that invoked the progress handler.
# Note that (sqlite3_prepare_v2()) and (sqlite3_step()) both modify their
# database connections for the meaning of "modify" in this paragraph.
- #
- # @method progress_handler(sqlite3, int, , void)
- # @param [Sqlite3] sqlite3
- # @param [Integer] int
- # @param [FFI::Pointer(*)]
- # @param [FFI::Pointer(*Void)] void
- # @return [nil]
+
+ # @method progress_handler(sqlite3, int, functionproto, void)
+ # @param [Sqlite3] sqlite3
+ # @param [Integer] int
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @param [FFI::Pointer(*Void)] void
+ # @return [nil]
# @scope class
attach_function :progress_handler, :sqlite3_progress_handler, [Sqlite3, :int, :pointer, :pointer], :void
-
# CAPI3REF: Opening A New Database Connection
- #
+
# ^These routines open an SQLite database file as specified by the
# filename argument. ^The filename argument is interpreted as UTF-8 for
# sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
@@ -2214,15 +2180,15 @@ class MemMethods < FFI::Struct
# (sqlite3_errmsg()) or (sqlite3_errmsg16()) routines can be used to obtain
# an English language description of the error following a failure of any
# of the sqlite3_open() routines.
- #
+
# ^The default encoding for the database will be UTF-8 if
# sqlite3_open() or sqlite3_open_v2() is called and
# UTF-16 in the native byte order if sqlite3_open16() is used.
- #
+
# Whether or not an error occurs when it is opened, resources
# associated with the (database connection) handle should be released by
# passing it to (sqlite3_close()) when it is no longer required.
- #
+
# The sqlite3_open_v2() interface works like sqlite3_open()
# except that it accepts two additional parameters for additional control
# over the new database connection. ^(The flags parameter to
@@ -2230,28 +2196,28 @@ class MemMethods < FFI::Struct
# the following three values, optionally combined with the
# (SQLITE_OPEN_NOMUTEX), (SQLITE_OPEN_FULLMUTEX), (SQLITE_OPEN_SHAREDCACHE),
# (SQLITE_OPEN_PRIVATECACHE), and/or (SQLITE_OPEN_URI) flags:)^
- #
+
#
# ^(- (SQLITE_OPEN_READONLY)
# - The database is opened in read-only mode. If the database does not
# already exist, an error is returned.
)^
- #
+
# ^(- (SQLITE_OPEN_READWRITE)
# - The database is opened for reading and writing if possible, or reading
# only if the file is write protected by the operating system. In either
# case the database must already exist, otherwise an error is returned.
)^
- #
+
# ^(- (SQLITE_OPEN_READWRITE) | (SQLITE_OPEN_CREATE)
# - The database is opened for reading and writing, and is created if
# it does not already exist. This is the behavior that is always used for
# sqlite3_open() and sqlite3_open16().
)^
#
- #
+
# If the 3rd parameter to sqlite3_open_v2() is not one of the
# combinations shown above optionally combined with other
# (SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits)
# then the behavior is undefined.
- #
+
# ^If the (SQLITE_OPEN_NOMUTEX) flag is set, then the database connection
# opens in the multi-thread (threading mode) as long as the single-thread
# mode has not been set at compile-time or start-time. ^If the
@@ -2263,12 +2229,12 @@ class MemMethods < FFI::Struct
# cache is enabled using (sqlite3_enable_shared_cache()). ^The
# (SQLITE_OPEN_PRIVATECACHE) flag causes the database connection to not
# participate in (shared cache mode) even if it is enabled.
- #
+
# ^The fourth parameter to sqlite3_open_v2() is the name of the
# (sqlite3_vfs) object that defines the operating system interface that
# the new database connection should use. ^If the fourth parameter is
# a NULL pointer then the default (sqlite3_vfs) object is used.
- #
+
# ^If the filename is ":memory:", then a private, temporary in-memory database
# is created for the connection. ^This in-memory database will vanish when
# the database connection is closed. Future versions of SQLite might
@@ -2276,13 +2242,13 @@ class MemMethods < FFI::Struct
# It is recommended that when a database filename actually does begin with
# a ":" character you should prefix the filename with a pathname such as
# "./" to avoid ambiguity.
- #
+
# ^If the filename is an empty string, then a private, temporary
# on-disk database will be created. ^This private database will be
# automatically deleted as soon as the database connection is closed.
- #
+
# ((URI filenames in sqlite3_open())) URI Filenames
- #
+
# ^If (URI filename) interpretation is enabled, and the filename argument
# begins with "file:", then the filename is interpreted as a URI. ^URI
# filename interpretation is enabled if the (SQLITE_OPEN_URI) flag is
@@ -2293,13 +2259,13 @@ class MemMethods < FFI::Struct
# by default, but future releases of SQLite might enable URI filename
# interpretation by default. See "(URI filenames)" for additional
# information.
- #
+
# URI filenames are parsed according to RFC 3986. ^If the URI contains an
# authority, then it must be either an empty string or the string
# "localhost". ^If the authority is not an empty string or "localhost", an
# error is returned to the caller. ^The fragment component of a URI, if
# present, is ignored.
- #
+
# ^SQLite uses the path component of the URI as the name of the disk file
# which contains the database. ^If the path begins with a '/' character,
# then it is interpreted as an absolute path. ^If the path does not begin
@@ -2307,12 +2273,12 @@ class MemMethods < FFI::Struct
# then the path is interpreted as a relative path.
# ^On windows, the first component of an absolute path
# is a drive specification (e.g. "C:").
- #
+
# ((core URI query parameters))
# The query component of a URI may contain parameters that are interpreted
# either by SQLite itself, or by a (VFS | custom VFS implementation).
# SQLite interprets the following three query parameters:
- #
+
#
# - vfs: ^The "vfs" parameter may be used to specify the name of
# a VFS object that provides the operating system interface that should
@@ -2321,7 +2287,7 @@ class MemMethods < FFI::Struct
# VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is
# present, then the VFS specified by the option takes precedence over
# the value passed as the fourth parameter to sqlite3_open_v2().
- #
+
#
- mode: ^(The mode parameter may be set to either "ro", "rw" or
# "rwc". Attempting to set it to any other value is an error)^.
# ^If "ro" is specified, then the database is opened for read-only
@@ -2334,7 +2300,7 @@ class MemMethods < FFI::Struct
# used, it is an error to specify a value for the mode parameter that is
# less restrictive than that specified by the flags passed as the third
# parameter.
- #
+
#
- cache: ^The cache parameter may be set to either "shared" or
# "private". ^Setting it to "shared" is equivalent to setting the
# SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to
@@ -2344,14 +2310,14 @@ class MemMethods < FFI::Struct
# a URI filename, its value overrides any behaviour requested by setting
# SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag.
#
- #
+
# ^Specifying an unknown parameter in the query component of a URI is not an
# error. Future versions of SQLite might understand additional query
# parameters. See "(query parameters with special meaning to SQLite)" for
# additional information.
- #
+
# ((URI filename examples)) URI filename examples
- #
+
#
# | URI filenames | Results
# |
|---|
| file:data.db |
@@ -2377,7 +2343,7 @@ class MemMethods < FFI::Struct
# |
| file:data.db?mode=readonly |
# An error. "readonly" is not a valid option for the "mode" parameter.
# |
- #
+
# ^URI hexadecimal escape sequences (%HH) are supported within the path and
# query components of a URI. A hexadecimal escape sequence consists of a
# percent sign - "%" - followed by exactly two hexadecimal digits
@@ -2386,65 +2352,61 @@ class MemMethods < FFI::Struct
# hexadecimal escape sequences replaced by a single byte containing the
# corresponding octet. If this process generates an invalid UTF-8 encoding,
# the results are undefined.
- #
+
# Note to Windows users: The encoding used for the filename argument
# of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
# codepage is currently defined. Filenames containing international
# characters must be converted to UTF-8 prior to passing them into
# sqlite3_open() or sqlite3_open_v2().
- #
+
# @method open(filename, pp_db)
- # @param [String] filename
- # @param [FFI::Pointer(**Sqlite3)] pp_db
- # @return [Integer]
+ # @param [String] filename
+ # @param [FFI::Pointer(**Sqlite3)] pp_db
+ # @return [Integer]
# @scope class
attach_function :open, :sqlite3_open, [:string, :pointer], :int
-
# (Not documented)
- #
+
# @method open16(filename, pp_db)
- # @param [FFI::Pointer(*Void)] filename
- # @param [FFI::Pointer(**Sqlite3)] pp_db
- # @return [Integer]
+ # @param [FFI::Pointer(*Void)] filename
+ # @param [FFI::Pointer(**Sqlite3)] pp_db
+ # @return [Integer]
# @scope class
attach_function :open16, :sqlite3_open16, [:pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method open_v2(filename, pp_db, flags, z_vfs)
- # @param [String] filename
- # @param [FFI::Pointer(**Sqlite3)] pp_db
- # @param [Integer] flags
- # @param [String] z_vfs
- # @return [Integer]
+ # @param [String] filename
+ # @param [FFI::Pointer(**Sqlite3)] pp_db
+ # @param [Integer] flags
+ # @param [String] z_vfs
+ # @return [Integer]
# @scope class
attach_function :open_v2, :sqlite3_open_v2, [:string, :pointer, :int, :string], :int
-
# CAPI3REF: Obtain Values For URI Parameters
- #
+
# This is a utility routine, useful to VFS implementations, that checks
# to see if a database file was a URI that contained a specific query
# parameter, and if so obtains the value of the query parameter.
- #
+
# The zFilename argument is the filename pointer passed into the xOpen()
# method of a VFS implementation. The zParam argument is the name of the
# query parameter we seek. This routine returns the value of the zParam
# parameter if it exists. If the parameter does not exist, this routine
# returns a NULL pointer.
- #
+
# If the zFilename argument to this function is not a pointer that SQLite
# passed into the xOpen VFS method, then the behavior of this routine
# is undefined and probably undesirable.
- #
+
# @method uri_parameter(z_filename, z_param)
- # @param [String] z_filename
- # @param [String] z_param
- # @return [String]
+ # @param [String] z_filename
+ # @param [String] z_param
+ # @return [String]
# @scope class
attach_function :uri_parameter, :sqlite3_uri_parameter, [:string, :string], :string
-
# CAPI3REF: Error Codes And Messages
- #
+
# ^The sqlite3_errcode() interface returns the numeric (result code) or
# (extended result code) for the most recent failed sqlite3_* API call
# associated with a (database connection). If a prior API call failed
@@ -2453,14 +2415,14 @@ class MemMethods < FFI::Struct
# interface is the same except that it always returns the
# (extended result code) even when extended result codes are
# disabled.
- #
+
# ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
# text that describes the error, as either UTF-8 or UTF-16 respectively.
# ^(Memory to hold the error message string is managed internally.
# The application does not need to worry about freeing the result.
# However, the error string might be overwritten or deallocated by
# subsequent calls to other SQLite interface functions.)^
- #
+
# When the serialized (threading mode) is in use, it might be the
# case that a second error occurs on a separate thread in between
# the time of the first error and the call to these interfaces.
@@ -2470,50 +2432,46 @@ class MemMethods < FFI::Struct
# by invoking (sqlite3_mutex_enter)((sqlite3_db_mutex)(D)) before beginning
# to use D and invoking (sqlite3_mutex_leave)((sqlite3_db_mutex)(D)) after
# all calls to the interfaces listed here are completed.
- #
+
# If an interface fails with SQLITE_MISUSE, that means the interface
# was invoked incorrectly by the application. In that case, the
# error code and message may or may not be set.
- #
+
# @method errcode(db)
- # @param [Sqlite3] db
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @return [Integer]
# @scope class
attach_function :errcode, :sqlite3_errcode, [Sqlite3], :int
-
# (Not documented)
- #
+
# @method extended_errcode(db)
- # @param [Sqlite3] db
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @return [Integer]
# @scope class
attach_function :extended_errcode, :sqlite3_extended_errcode, [Sqlite3], :int
-
# (Not documented)
- #
+
# @method errmsg(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [String]
+ # @param [Sqlite3] sqlite3
+ # @return [String]
# @scope class
attach_function :errmsg, :sqlite3_errmsg, [Sqlite3], :string
-
# (Not documented)
- #
+
# @method errmsg16(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [FFI::Pointer(*Void)]
+ # @param [Sqlite3] sqlite3
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :errmsg16, :sqlite3_errmsg16, [Sqlite3], :pointer
-
# CAPI3REF: SQL Statement Object
# KEYWORDS: {prepared statement} {prepared statements}
- #
+
# An instance of this object represents a single SQL statement.
# This object is variously known as a "prepared statement" or a
# "compiled SQL statement" or simply as a "statement".
- #
+
# The life of a statement object goes something like this:
- #
+
#
# - Create the object using (sqlite3_prepare_v2()) or a related
# function.
@@ -2524,37 +2482,37 @@ class MemMethods < FFI::Struct
# to step 2. Do this zero or more times.
#
- Destroy the object using (sqlite3_finalize()).
#
- #
+
# Refer to documentation on individual methods above for additional
# information.
module StmtWrappers
- # @return [Integer]
+ # @return [Integer]
def readonly()
SQLite3.stmt_readonly(self)
end
-
- # @param [Integer] op
- # @param [Integer] reset_flg
- # @return [Integer]
+
+ # @param [Integer] op
+ # @param [Integer] reset_flg
+ # @return [Integer]
def status(op, reset_flg)
SQLite3.stmt_status(self, op, reset_flg)
end
end
-
+
class Stmt < FFI::Struct
include StmtWrappers
layout :dummy, :char
end
-
+
# CAPI3REF: Run-time Limits
- #
+
# ^(This interface allows the size of various constructs to be limited
# on a connection by connection basis. The first parameter is the
# (database connection) whose limit is to be set or queried. The
# second parameter is one of the (limit categories) that define a
# class of constructs to be size limited. The third parameter is the
# new limit for that construct.)^
- #
+
# ^If the new limit is a negative number, the limit is unchanged.
# ^(For each limit category SQLITE_LIMIT_NAME there is a
# (limits | hard upper bound)
@@ -2563,12 +2521,12 @@ class Stmt < FFI::Struct
# (The "_LIMIT_" in the name is changed to "_MAX_".))^
# ^Attempts to increase a limit above its hard upper bound are
# silently truncated to the hard upper bound.
- #
+
# ^Regardless of whether or not the limit was changed, the
# (sqlite3_limit()) interface returns the prior value of the limit.
# ^Hence, to find the current value of a limit without changing it,
# simply invoke this interface with the third parameter set to -1.
- #
+
# Run-time limits are intended for use in applications that manage
# both their own internal database and also databases that are controlled
# by untrusted external sources. An example application might be a
@@ -2581,32 +2539,31 @@ class Stmt < FFI::Struct
# interface to further control untrusted SQL. The size of the database
# created by an untrusted script can be contained using the
# (max_page_count) (PRAGMA).
- #
+
# New run-time limit categories may be added in future releases.
- #
+
# @method limit(sqlite3, id, new_val)
- # @param [Sqlite3] sqlite3
- # @param [Integer] id
- # @param [Integer] new_val
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [Integer] id
+ # @param [Integer] new_val
+ # @return [Integer]
# @scope class
attach_function :limit, :sqlite3_limit, [Sqlite3, :int, :int], :int
-
# CAPI3REF: Compiling An SQL Statement
# KEYWORDS: {SQL statement compiler}
- #
+
# To execute an SQL query, it must first be compiled into a byte-code
# program using one of these routines.
- #
+
# The first argument, "db", is a (database connection) obtained from a
# prior successful call to (sqlite3_open()), (sqlite3_open_v2()) or
# (sqlite3_open16()). The database connection must not have been closed.
- #
+
# The second argument, "zSql", is the statement to be compiled, encoded
# as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2()
# interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
# use UTF-16.
- #
+
# ^If the nByte argument is less than zero, then zSql is read up to the
# first zero terminator. ^If nByte is non-negative, then it is the maximum
# number of bytes read from zSql. ^When nByte is non-negative, the
@@ -2617,12 +2574,12 @@ class Stmt < FFI::Struct
# is equal to the number of bytes in the input string including
# the nul-terminator bytes as this saves SQLite from having to
# make a copy of the input string.
- #
+
# ^If pzTail is not NULL then *pzTail is made to point to the first byte
# past the end of the first SQL statement in zSql. These routines only
# compile the first statement in zSql, so *pzTail is left pointing to
# what remains uncompiled.
- #
+
# ^*ppStmt is left pointing to a compiled (prepared statement) that can be
# executed using (sqlite3_step()). ^If there is an error, *ppStmt is set
# to NULL. ^If the input text contains no SQL (if the input is an empty
@@ -2630,10 +2587,10 @@ class Stmt < FFI::Struct
# The calling procedure is responsible for deleting the compiled
# SQL statement using (sqlite3_finalize()) after it has finished with it.
# ppStmt may not be NULL.
- #
+
# ^On success, the sqlite3_prepare() family of routines return (SQLITE_OK);
# otherwise an (error code) is returned.
- #
+
# The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
# recommended for all new programs. The two older interfaces are retained
# for backwards compatibility, but their use is discouraged.
@@ -2641,14 +2598,14 @@ class Stmt < FFI::Struct
# that is returned (the (sqlite3_stmt) object) contains a copy of the
# original SQL text. This causes the (sqlite3_step()) interface to
# behave differently in three ways:
- #
+
#
# -
# ^If the database schema changes, instead of returning (SQLITE_SCHEMA) as it
# always used to do, (sqlite3_step()) will automatically recompile the SQL
# statement and try to run it again.
#
- #
+
# -
# ^When an error occurs, (sqlite3_step()) will return one of the detailed
# (error codes) or (extended error codes). ^The legacy behavior was that
@@ -2657,7 +2614,7 @@ class Stmt < FFI::Struct
# in order to find the underlying cause of the problem. With the "v2" prepare
# interfaces, the underlying reason for the error is returned immediately.
#
- #
+
# -
# ^If the specific value bound to (parameter | host parameter) in the
# WHERE clause might influence the choice of query plan for a statement,
@@ -2671,84 +2628,79 @@ class Stmt < FFI::Struct
# the
#
#
- #
+
# @method prepare(db, z_sql, n_byte, pp_stmt, pz_tail)
- # @param [Sqlite3] db
- # @param [String] z_sql
- # @param [Integer] n_byte
- # @param [FFI::Pointer(**Stmt)] pp_stmt
- # @param [FFI::Pointer(**CharS)] pz_tail
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_sql
+ # @param [Integer] n_byte
+ # @param [FFI::Pointer(**Stmt)] pp_stmt
+ # @param [FFI::Pointer(**CharS)] pz_tail
+ # @return [Integer]
# @scope class
attach_function :prepare, :sqlite3_prepare, [Sqlite3, :string, :int, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method prepare_v2(db, z_sql, n_byte, pp_stmt, pz_tail)
- # @param [Sqlite3] db
- # @param [String] z_sql
- # @param [Integer] n_byte
- # @param [FFI::Pointer(**Stmt)] pp_stmt
- # @param [FFI::Pointer(**CharS)] pz_tail
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_sql
+ # @param [Integer] n_byte
+ # @param [FFI::Pointer(**Stmt)] pp_stmt
+ # @param [FFI::Pointer(**CharS)] pz_tail
+ # @return [Integer]
# @scope class
attach_function :prepare_v2, :sqlite3_prepare_v2, [Sqlite3, :string, :int, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method prepare16(db, z_sql, n_byte, pp_stmt, pz_tail)
- # @param [Sqlite3] db
- # @param [FFI::Pointer(*Void)] z_sql
- # @param [Integer] n_byte
- # @param [FFI::Pointer(**Stmt)] pp_stmt
- # @param [FFI::Pointer(**Void)] pz_tail
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [FFI::Pointer(*Void)] z_sql
+ # @param [Integer] n_byte
+ # @param [FFI::Pointer(**Stmt)] pp_stmt
+ # @param [FFI::Pointer(**Void)] pz_tail
+ # @return [Integer]
# @scope class
attach_function :prepare16, :sqlite3_prepare16, [Sqlite3, :pointer, :int, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method prepare16_v2(db, z_sql, n_byte, pp_stmt, pz_tail)
- # @param [Sqlite3] db
- # @param [FFI::Pointer(*Void)] z_sql
- # @param [Integer] n_byte
- # @param [FFI::Pointer(**Stmt)] pp_stmt
- # @param [FFI::Pointer(**Void)] pz_tail
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [FFI::Pointer(*Void)] z_sql
+ # @param [Integer] n_byte
+ # @param [FFI::Pointer(**Stmt)] pp_stmt
+ # @param [FFI::Pointer(**Void)] pz_tail
+ # @return [Integer]
# @scope class
attach_function :prepare16_v2, :sqlite3_prepare16_v2, [Sqlite3, :pointer, :int, :pointer, :pointer], :int
-
# CAPI3REF: Retrieving Statement SQL
- #
+
# ^This interface can be used to retrieve a saved copy of the original
# SQL text used to create a (prepared statement) if that statement was
# compiled using either (sqlite3_prepare_v2()) or (sqlite3_prepare16_v2()).
- #
+
# @method sql(p_stmt)
- # @param [Stmt] p_stmt
- # @return [String]
+ # @param [Stmt] p_stmt
+ # @return [String]
# @scope class
attach_function :sql, :sqlite3_sql, [Stmt], :string
-
# CAPI3REF: Determine If An SQL Statement Writes The Database
- #
+
# ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if
# and only if the (prepared statement) X makes no direct changes to
# the content of the database file.
- #
+
# Note that (application-defined SQL functions) or
# (virtual tables) might change the database indirectly as a side effect.
# ^(For example, if an application defines a function "eval()" that
# calls (sqlite3_exec()), then the following SQL statement would
# change the database file through side-effects:
- #
+
#
# SELECT eval('DELETE FROM t1') FROM t2;
#
- #
+
# But because the (SELECT) statement does not change the database file
# directly, sqlite3_stmt_readonly() would still return true.)^
- #
+
# ^Transaction control statements such as (BEGIN), (COMMIT), (ROLLBACK),
# (SAVEPOINT), and (RELEASE) cause sqlite3_stmt_readonly() to return true,
# since the statements themselves do not actually modify the database but
@@ -2757,27 +2709,26 @@ class Stmt < FFI::Struct
# sqlite3_stmt_readonly() to return true since, while those statements
# change the configuration of a database connection, they do not make
# changes to the content of the database files on disk.
- #
+
# @method stmt_readonly(p_stmt)
- # @param [Stmt] p_stmt
- # @return [Integer]
+ # @param [Stmt] p_stmt
+ # @return [Integer]
# @scope class
attach_function :stmt_readonly, :sqlite3_stmt_readonly, [Stmt], :int
-
# CAPI3REF: Dynamically Typed Value Object
# KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
- #
+
# SQLite uses the sqlite3_value object to represent all values
# that can be stored in a database table. SQLite uses dynamic typing
# for the values it stores. ^Values stored in sqlite3_value objects
# can be integers, floating point values, strings, BLOBs, or NULL.
- #
+
# An sqlite3_value object may be either "protected" or "unprotected".
# Some interfaces require a protected sqlite3_value. Other interfaces
# will accept either a protected or an unprotected sqlite3_value.
# Every interface that accepts sqlite3_value arguments specifies
# whether or not it requires a protected sqlite3_value.
- #
+
# The terms "protected" and "unprotected" refer to whether or not
# a mutex is held. An internal mutex is held for a protected
# sqlite3_value object but no mutex is held for an unprotected
@@ -2790,7 +2741,7 @@ class Stmt < FFI::Struct
# for maximum code portability it is recommended that applications
# still make the distinction between protected and unprotected
# sqlite3_value objects even when not strictly required.
- #
+
# ^The sqlite3_value objects that are passed as parameters into the
# implementation of (application-defined SQL functions) are protected.
# ^The sqlite3_value object returned by
@@ -2802,9 +2753,9 @@ class Stmt < FFI::Struct
class Mem < FFI::Struct
layout :dummy, :char
end
-
+
# CAPI3REF: SQL Function Context Object
- #
+
# The context in which an SQL function executes is stored in an
# sqlite3_context object. ^A pointer to an sqlite3_context object
# is always first parameter to (application-defined SQL functions).
@@ -2814,25 +2765,25 @@ class Mem < FFI::Struct
# (sqlite3_context_db_handle()), (sqlite3_get_auxdata()),
# and/or (sqlite3_set_auxdata()).
module ContextWrappers
- # @return [Sqlite3]
+ # @return [Sqlite3]
def db_handle()
Sqlite3.new SQLite3.context_db_handle(self)
end
end
-
+
class Context < FFI::Struct
include ContextWrappers
layout :dummy, :char
end
-
+
# CAPI3REF: Binding Values To Prepared Statements
# KEYWORDS: {host parameter} {host parameters} {host parameter name}
# KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}
- #
+
# ^(In the SQL statement text input to (sqlite3_prepare_v2()) and its variants,
# literals may be replaced by a (parameter) that matches one of following
# templates:
- #
+
#
# - ?
#
- ?NNN
@@ -2840,16 +2791,16 @@ class Context < FFI::Struct
#
- @VVV
#
- $VVV
#
- #
+
# In the templates above, NNN represents an integer literal,
# and VVV represents an alphanumeric identifier.)^ ^The values of these
# parameters (also called "host parameter names" or "SQL parameters")
# can be set using the sqlite3_bind_*() routines defined here.
- #
+
# ^The first argument to the sqlite3_bind_*() routines is always
# a pointer to the (sqlite3_stmt) object returned from
# (sqlite3_prepare_v2()) or its variants.
- #
+
# ^The second argument is the index of the SQL parameter to be set.
# ^The leftmost SQL parameter has an index of 1. ^When the same named
# SQL parameter is used more than once, second and subsequent
@@ -2859,9 +2810,9 @@ class Context < FFI::Struct
# for "?NNN" parameters is the value of NNN.
# ^The NNN value must be between 1 and the (sqlite3_limit())
# parameter (SQLITE_LIMIT_VARIABLE_NUMBER) (default value: 999).
- #
+
# ^The third argument is the value to bind to the parameter.
- #
+
# ^(In those routines that have a fourth argument, its value is the
# number of bytes in the parameter. To be clear: the value is the
# number of bytes in the value, not the number of characters.)^
@@ -2874,7 +2825,7 @@ class Context < FFI::Struct
# the value of the fourth parameter then the resulting string value will
# contain embedded NULs. The result of expressions involving strings
# with embedded NULs is undefined.
- #
+
# ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
# sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
# string after SQLite has finished with it. ^The destructor is called
@@ -2886,7 +2837,7 @@ class Context < FFI::Struct
# ^If the fifth argument has the value (SQLITE_TRANSIENT), then
# SQLite makes its own private copy of the data immediately, before
# the sqlite3_bind_*() routine returns.
- #
+
# ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
# is filled with zeroes. ^A zeroblob uses a fixed amount of memory
# (just an integer to hold its size) while it is being processed.
@@ -2894,143 +2845,133 @@ class Context < FFI::Struct
# content is later written using
# (sqlite3_blob_open | incremental BLOB I/O) routines.
# ^A negative value for the zeroblob results in a zero-length BLOB.
- #
+
# ^If any of the sqlite3_bind_*() routines are called with a NULL pointer
# for the (prepared statement) or with a prepared statement for which
# (sqlite3_step()) has been called more recently than (sqlite3_reset()),
# then the call will return (SQLITE_MISUSE). If any sqlite3_bind_()
# routine is passed a (prepared statement) that has been finalized, the
# result is undefined and probably harmful.
- #
+
# ^Bindings are not cleared by the (sqlite3_reset()) routine.
# ^Unbound parameters are interpreted as NULL.
- #
+
# ^The sqlite3_bind_* routines return (SQLITE_OK) on success or an
# (error code) if anything goes wrong.
# ^(SQLITE_RANGE) is returned if the parameter
# index is out of range. ^(SQLITE_NOMEM) is returned if malloc() fails.
- #
+
# See also: (sqlite3_bind_parameter_count()),
# (sqlite3_bind_parameter_name()), and (sqlite3_bind_parameter_index()).
- #
- # @method bind_blob(stmt, int, void, n, )
- # @param [Stmt] stmt
- # @param [Integer] int
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] n
- # @param [FFI::Pointer(*)]
- # @return [Integer]
+
+ # @method bind_blob(stmt, int, void, n, functionproto)
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] n
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [Integer]
# @scope class
attach_function :bind_blob, :sqlite3_bind_blob, [Stmt, :int, :pointer, :int, :pointer], :int
-
# (Not documented)
- #
+
# @method bind_double(stmt, int, double)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @param [Float] double
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @param [Float] double
+ # @return [Integer]
# @scope class
attach_function :bind_double, :sqlite3_bind_double, [Stmt, :int, :double], :int
-
# (Not documented)
- #
+
# @method bind_int(stmt, int, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @param [Integer] int
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @param [Integer] int
+ # @return [Integer]
# @scope class
attach_function :bind_int, :sqlite3_bind_int, [Stmt, :int, :int], :int
-
# (Not documented)
- #
+
# @method bind_int64(stmt, int, long_long)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @param [Integer] long_long
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @param [Integer] long_long
+ # @return [Integer]
# @scope class
attach_function :bind_int64, :sqlite3_bind_int64, [Stmt, :int, :long_long], :int
-
# (Not documented)
- #
+
# @method bind_null(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [Integer]
# @scope class
attach_function :bind_null, :sqlite3_bind_null, [Stmt, :int], :int
-
# (Not documented)
- #
- # @method bind_text(stmt, int, string, n, )
- # @param [Stmt] stmt
- # @param [Integer] int
- # @param [String] string
- # @param [Integer] n
- # @param [FFI::Pointer(*)]
- # @return [Integer]
+
+ # @method bind_text(stmt, int, string, n, functionproto)
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @param [String] string
+ # @param [Integer] n
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [Integer]
# @scope class
attach_function :bind_text, :sqlite3_bind_text, [Stmt, :int, :string, :int, :pointer], :int
-
# (Not documented)
- #
- # @method bind_text16(stmt, int, void, int, )
- # @param [Stmt] stmt
- # @param [Integer] int
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] int
- # @param [FFI::Pointer(*)]
- # @return [Integer]
+
+ # @method bind_text16(stmt, int, void, int, functionproto)
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] int
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [Integer]
# @scope class
attach_function :bind_text16, :sqlite3_bind_text16, [Stmt, :int, :pointer, :int, :pointer], :int
-
# (Not documented)
- #
+
# @method bind_value(stmt, int, mem)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @param [Mem] mem
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @param [Mem] mem
+ # @return [Integer]
# @scope class
attach_function :bind_value, :sqlite3_bind_value, [Stmt, :int, Mem], :int
-
# (Not documented)
- #
+
# @method bind_zeroblob(stmt, int, n)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @param [Integer] n
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @param [Integer] n
+ # @return [Integer]
# @scope class
attach_function :bind_zeroblob, :sqlite3_bind_zeroblob, [Stmt, :int, :int], :int
-
# CAPI3REF: Number Of SQL Parameters
- #
+
# ^This routine can be used to find the number of (SQL parameters)
# in a (prepared statement). SQL parameters are tokens of the
# form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as
# placeholders for values that are (sqlite3_bind_blob | bound)
# to the parameters at a later time.
- #
+
# ^(This routine actually returns the index of the largest (rightmost)
# parameter. For all forms except ?NNN, this will correspond to the
# number of unique parameters. If parameters of the ?NNN form are used,
# there may be gaps in the list.)^
- #
+
# See also: (sqlite3_bind_blob|sqlite3_bind()),
# (sqlite3_bind_parameter_name()), and
# (sqlite3_bind_parameter_index()).
- #
+
# @method bind_parameter_count(stmt)
- # @param [Stmt] stmt
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @return [Integer]
# @scope class
attach_function :bind_parameter_count, :sqlite3_bind_parameter_count, [Stmt], :int
-
# CAPI3REF: Name Of A Host Parameter
- #
+
# ^The sqlite3_bind_parameter_name(P,N) interface returns
# the name of the N-th (SQL parameter) in the (prepared statement) P.
# ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA"
@@ -3040,74 +2981,70 @@ class Context < FFI::Struct
# is included as part of the name.)^
# ^Parameters of the form "?" without a following integer have no name
# and are referred to as "nameless" or "anonymous parameters".
- #
+
# ^The first host parameter has an index of 1, not 0.
- #
+
# ^If the value N is out of range or if the N-th parameter is
# nameless, then NULL is returned. ^The returned string is
# always in UTF-8 encoding even if the named parameter was
# originally specified as UTF-16 in (sqlite3_prepare16()) or
# (sqlite3_prepare16_v2()).
- #
+
# See also: (sqlite3_bind_blob|sqlite3_bind()),
# (sqlite3_bind_parameter_count()), and
# (sqlite3_bind_parameter_index()).
- #
+
# @method bind_parameter_name(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [String]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [String]
# @scope class
attach_function :bind_parameter_name, :sqlite3_bind_parameter_name, [Stmt, :int], :string
-
# CAPI3REF: Index Of A Parameter With A Given Name
- #
+
# ^Return the index of an SQL parameter given its name. ^The
# index value returned is suitable for use as the second
# parameter to (sqlite3_bind_blob|sqlite3_bind()). ^A zero
# is returned if no matching parameter is found. ^The parameter
# name must be given in UTF-8 even if the original statement
# was prepared from UTF-16 text using (sqlite3_prepare16_v2()).
- #
+
# See also: (sqlite3_bind_blob|sqlite3_bind()),
# (sqlite3_bind_parameter_count()), and
# (sqlite3_bind_parameter_index()).
- #
+
# @method bind_parameter_index(stmt, z_name)
- # @param [Stmt] stmt
- # @param [String] z_name
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [String] z_name
+ # @return [Integer]
# @scope class
attach_function :bind_parameter_index, :sqlite3_bind_parameter_index, [Stmt, :string], :int
-
# CAPI3REF: Reset All Bindings On A Prepared Statement
- #
+
# ^Contrary to the intuition of many, (sqlite3_reset()) does not reset
# the (sqlite3_bind_blob | bindings) on a (prepared statement).
# ^Use this routine to reset all host parameters to NULL.
- #
+
# @method clear_bindings(stmt)
- # @param [Stmt] stmt
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @return [Integer]
# @scope class
attach_function :clear_bindings, :sqlite3_clear_bindings, [Stmt], :int
-
# CAPI3REF: Number Of Columns In A Result Set
- #
+
# ^Return the number of columns in the result set returned by the
# (prepared statement). ^This routine returns 0 if pStmt is an SQL
# statement that does not return data (for example an (UPDATE)).
- #
+
# See also: (sqlite3_data_count())
- #
+
# @method column_count(p_stmt)
- # @param [Stmt] p_stmt
- # @return [Integer]
+ # @param [Stmt] p_stmt
+ # @return [Integer]
# @scope class
attach_function :column_count, :sqlite3_column_count, [Stmt], :int
-
# CAPI3REF: Column Names In A Result Set
- #
+
# ^These routines return the name assigned to a particular column
# in the result set of a (SELECT) statement. ^The sqlite3_column_name()
# interface returns a pointer to a zero-terminated UTF-8 string
@@ -3115,40 +3052,38 @@ class Context < FFI::Struct
# UTF-16 string. ^The first parameter is the (prepared statement)
# that implements the (SELECT) statement. ^The second parameter is the
# column number. ^The leftmost column is number 0.
- #
+
# ^The returned string pointer is valid until either the (prepared statement)
# is destroyed by (sqlite3_finalize()) or until the statement is automatically
# reprepared by the first call to (sqlite3_step()) for a particular run
# or until the next call to
# sqlite3_column_name() or sqlite3_column_name16() on the same column.
- #
+
# ^If sqlite3_malloc() fails during the processing of either routine
# (for example during a conversion from UTF-8 to UTF-16) then a
# NULL pointer is returned.
- #
+
# ^The name of a result column is the value of the "AS" clause for
# that column, if there is an AS clause. If there is no AS clause
# then the name of the column is unspecified and may change from
# one release of SQLite to the next.
- #
+
# @method column_name(stmt, n)
- # @param [Stmt] stmt
- # @param [Integer] n
- # @return [String]
+ # @param [Stmt] stmt
+ # @param [Integer] n
+ # @return [String]
# @scope class
attach_function :column_name, :sqlite3_column_name, [Stmt, :int], :string
-
# (Not documented)
- #
+
# @method column_name16(stmt, n)
- # @param [Stmt] stmt
- # @param [Integer] n
- # @return [FFI::Pointer(*Void)]
+ # @param [Stmt] stmt
+ # @param [Integer] n
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :column_name16, :sqlite3_column_name16, [Stmt, :int], :pointer
-
# CAPI3REF: Source Of Data In A Query Result
- #
+
# ^These routines provide a means to determine the database, table, and
# table column that is the origin of a particular result column in
# (SELECT) statement.
@@ -3161,90 +3096,84 @@ class Context < FFI::Struct
# reprepared by the first call to (sqlite3_step()) for a particular run
# or until the same information is requested
# again in a different encoding.
- #
+
# ^The names returned are the original un-aliased names of the
# database, table, and column.
- #
+
# ^The first argument to these interfaces is a (prepared statement).
# ^These functions return information about the Nth result column returned by
# the statement, where N is the second function argument.
# ^The left-most column is column 0 for these routines.
- #
+
# ^If the Nth column returned by the statement is an expression or
# subquery and is not a column value, then all of these functions return
# NULL. ^These routine might also return NULL if a memory allocation error
# occurs. ^Otherwise, they return the name of the attached database, table,
# or column that query result column was extracted from.
- #
+
# ^As with all other SQLite APIs, those whose names end with "16" return
# UTF-16 encoded strings and the other functions return UTF-8.
- #
+
# ^These APIs are only available if the library was compiled with the
# (SQLITE_ENABLE_COLUMN_METADATA) C-preprocessor symbol.
- #
+
# If two or more threads call one or more of these routines against the same
# prepared statement and column at the same time then the results are
# undefined.
- #
+
# If two or more threads call one or more
# (sqlite3_column_database_name | column metadata interfaces)
# for the same (prepared statement) and result column
# at the same time then the results are undefined.
- #
+
# @method column_database_name(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [String]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [String]
# @scope class
attach_function :column_database_name, :sqlite3_column_database_name, [Stmt, :int], :string
-
# (Not documented)
- #
+
# @method column_database_name16(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [FFI::Pointer(*Void)]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :column_database_name16, :sqlite3_column_database_name16, [Stmt, :int], :pointer
-
# (Not documented)
- #
+
# @method column_table_name(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [String]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [String]
# @scope class
attach_function :column_table_name, :sqlite3_column_table_name, [Stmt, :int], :string
-
# (Not documented)
- #
+
# @method column_table_name16(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [FFI::Pointer(*Void)]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :column_table_name16, :sqlite3_column_table_name16, [Stmt, :int], :pointer
-
# (Not documented)
- #
+
# @method column_origin_name(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [String]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [String]
# @scope class
attach_function :column_origin_name, :sqlite3_column_origin_name, [Stmt, :int], :string
-
# (Not documented)
- #
+
# @method column_origin_name16(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [FFI::Pointer(*Void)]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :column_origin_name16, :sqlite3_column_origin_name16, [Stmt, :int], :pointer
-
# CAPI3REF: Declared Datatype Of A Query Result
- #
+
# ^(The first parameter is a (prepared statement).
# If this statement is a (SELECT) statement and the Nth column of the
# returned result set of that (SELECT) is a table column (not an
@@ -3252,77 +3181,75 @@ class Context < FFI::Struct
# column is returned.)^ ^If the Nth column of the result set is an
# expression or subquery, then a NULL pointer is returned.
# ^The returned string is always UTF-8 encoded.
- #
+
# ^(For example, given the database schema:
- #
+
# CREATE TABLE t1(c1 VARIANT);
- #
+
# and the following statement to be compiled:
- #
+
# SELECT c1 + 1, c1 FROM t1;
- #
+
# this routine would return the string "VARIANT" for the second result
# column (i==1), and a NULL pointer for the first result column (i==0).)^
- #
+
# ^SQLite uses dynamic run-time typing. ^So just because a column
# is declared to contain a particular type does not mean that the
# data stored in that column is of the declared type. SQLite is
# strongly typed, but the typing is dynamic not static. ^Type
# is associated with individual values, not with the containers
# used to hold those values.
- #
+
# @method column_decltype(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [String]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [String]
# @scope class
attach_function :column_decltype, :sqlite3_column_decltype, [Stmt, :int], :string
-
# (Not documented)
- #
+
# @method column_decltype16(stmt, int)
- # @param [Stmt] stmt
- # @param [Integer] int
- # @return [FFI::Pointer(*Void)]
+ # @param [Stmt] stmt
+ # @param [Integer] int
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :column_decltype16, :sqlite3_column_decltype16, [Stmt, :int], :pointer
-
# CAPI3REF: Evaluate An SQL Statement
- #
+
# After a (prepared statement) has been prepared using either
# (sqlite3_prepare_v2()) or (sqlite3_prepare16_v2()) or one of the legacy
# interfaces (sqlite3_prepare()) or (sqlite3_prepare16()), this function
# must be called one or more times to evaluate the statement.
- #
+
# The details of the behavior of the sqlite3_step() interface depend
# on whether the statement was prepared using the newer "v2" interface
# (sqlite3_prepare_v2()) and (sqlite3_prepare16_v2()) or the older legacy
# interface (sqlite3_prepare()) and (sqlite3_prepare16()). The use of the
# new "v2" interface is recommended for new applications but the legacy
# interface will continue to be supported.
- #
+
# ^In the legacy interface, the return value will be either (SQLITE_BUSY),
# (SQLITE_DONE), (SQLITE_ROW), (SQLITE_ERROR), or (SQLITE_MISUSE).
# ^With the "v2" interface, any of the other (result codes) or
# (extended result codes) might be returned as well.
- #
+
# ^(SQLITE_BUSY) means that the database engine was unable to acquire the
# database locks it needs to do its job. ^If the statement is a (COMMIT)
# or occurs outside of an explicit transaction, then you can retry the
# statement. If the statement is not a (COMMIT) and occurs within an
# explicit transaction then you should rollback the transaction before
# continuing.
- #
+
# ^(SQLITE_DONE) means that the statement has finished executing
# successfully. sqlite3_step() should not be called again on this virtual
# machine without first calling (sqlite3_reset()) to reset the virtual
# machine back to its initial state.
- #
+
# ^If the SQL statement being executed returns any data, then (SQLITE_ROW)
# is returned each time a new row of data is ready for processing by the
# caller. The values may be accessed using the (column access functions).
# sqlite3_step() is called again to retrieve the next row of data.
- #
+
# ^(SQLITE_ERROR) means that a run-time error (such as a constraint
# violation) has occurred. sqlite3_step() should not be called again on
# the VM. More information may be found by calling (sqlite3_errmsg()).
@@ -3331,14 +3258,14 @@ class Context < FFI::Struct
# can be obtained by calling (sqlite3_reset()) on the
# (prepared statement). ^In the "v2" interface,
# the more specific error code is returned directly by sqlite3_step().
- #
+
# (SQLITE_MISUSE) means that the this routine was called inappropriately.
# Perhaps it was called on a (prepared statement) that has
# already been (sqlite3_finalize | finalized) or on one that had
# previously returned (SQLITE_ERROR) or (SQLITE_DONE). Or it could
# be the case that the same database connection is being used by two or
# more threads at the same moment in time.
- #
+
# For all versions of SQLite up to and including 3.6.23.1, a call to
# (sqlite3_reset()) was required after sqlite3_step() returned anything
# other than (SQLITE_ROW) before any subsequent invocation of
@@ -3350,7 +3277,7 @@ class Context < FFI::Struct
# break because any application that ever receives an SQLITE_MISUSE error
# is broken by definition. The (SQLITE_OMIT_AUTORESET) compile-time option
# can be used to restore the legacy behavior.
- #
+
# Goofy Interface Alert: In the legacy interface, the sqlite3_step()
# API always returns a generic error code, (SQLITE_ERROR), following any
# error other than (SQLITE_BUSY) and (SQLITE_MISUSE). You must call
@@ -3362,15 +3289,14 @@ class Context < FFI::Struct
# of the legacy (sqlite3_prepare()) and (sqlite3_prepare16()) interfaces,
# then the more specific (error codes) are returned directly
# by sqlite3_step(). The use of the "v2" interface is recommended.
- #
+
# @method step(stmt)
- # @param [Stmt] stmt
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @return [Integer]
# @scope class
attach_function :step, :sqlite3_step, [Stmt], :int
-
# CAPI3REF: Number of columns in a result set
- #
+
# ^The sqlite3_data_count(P) interface returns the number of columns in the
# current row of the result set of (prepared statement) P.
# ^If prepared statement P does not have results ready to return
@@ -3383,20 +3309,19 @@ class Context < FFI::Struct
# (SQLITE_ROW), except in the case of the (PRAGMA incremental_vacuum)
# where it always returns zero since each step of that multi-step
# pragma returns 0 columns of data.
- #
+
# See also: (sqlite3_column_count())
- #
+
# @method data_count(p_stmt)
- # @param [Stmt] p_stmt
- # @return [Integer]
+ # @param [Stmt] p_stmt
+ # @return [Integer]
# @scope class
attach_function :data_count, :sqlite3_data_count, [Stmt], :int
-
# CAPI3REF: Result Values From A Query
# KEYWORDS: {column access functions}
- #
+
# These routines form the "result set" interface.
- #
+
# ^These routines return information about a single column of the current
# result row of a query. ^In every case the first argument is a pointer
# to the (prepared statement) that is being evaluated (the (sqlite3_stmt*)
@@ -3405,7 +3330,7 @@ class Context < FFI::Struct
# should be returned. ^The leftmost column of the result set has the index 0.
# ^The number of columns in the result can be determined using
# (sqlite3_column_count()).
- #
+
# If the SQL statement does not currently point to a valid row, or if the
# column index is out of range, the result is undefined.
# These routines may only be called when the most recent call to
@@ -3417,7 +3342,7 @@ class Context < FFI::Struct
# If (sqlite3_step()) or (sqlite3_reset()) or (sqlite3_finalize())
# are called from a different thread while any of these routines
# are pending, then the results are undefined.
- #
+
# ^The sqlite3_column_type() routine returns the
# (SQLITE_INTEGER | datatype code) for the initial data type
# of the result column. ^The returned value is one of (SQLITE_INTEGER),
@@ -3427,7 +3352,7 @@ class Context < FFI::Struct
# the value returned by sqlite3_column_type() is undefined. Future
# versions of SQLite may change the behavior of sqlite3_column_type()
# following a type conversion.
- #
+
# ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()
# routine returns the number of bytes in that BLOB or string.
# ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts
@@ -3436,7 +3361,7 @@ class Context < FFI::Struct
# (sqlite3_snprintf()) to convert that value to a UTF-8 string and returns
# the number of bytes in that string.
# ^If the result is NULL, then sqlite3_column_bytes() returns zero.
- #
+
# ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16()
# routine returns the number of bytes in that BLOB or string.
# ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts
@@ -3445,17 +3370,17 @@ class Context < FFI::Struct
# (sqlite3_snprintf()) to convert that value to a UTF-16 string and returns
# the number of bytes in that string.
# ^If the result is NULL, then sqlite3_column_bytes16() returns zero.
- #
+
# ^The values returned by (sqlite3_column_bytes()) and
# (sqlite3_column_bytes16()) do not include the zero terminators at the end
# of the string. ^For clarity: the values returned by
# (sqlite3_column_bytes()) and (sqlite3_column_bytes16()) are the number of
# bytes in the string, not the number of characters.
- #
+
# ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(),
# even empty strings, are always zero terminated. ^The return
# value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.
- #
+
# ^The object returned by (sqlite3_column_value()) is an
# (unprotected sqlite3_value) object. An unprotected sqlite3_value object
# may only be used with (sqlite3_bind_value()) and (sqlite3_result_value()).
@@ -3463,17 +3388,17 @@ class Context < FFI::Struct
# (sqlite3_column_value()) is used in any other way, including calls
# to routines like (sqlite3_value_int()), (sqlite3_value_text()),
# or (sqlite3_value_bytes()), then the behavior is undefined.
- #
+
# These routines attempt to convert the value where appropriate. ^For
# example, if the internal representation is FLOAT and a text result
# is requested, (sqlite3_snprintf()) is used internally to perform the
# conversion automatically. ^(The following table details the conversions
# that are applied:
- #
+
#
#
# Internal Type | Requested Type | Conversion
- #
+
# |
|---|
| NULL | INTEGER | Result is 0
# |
| NULL | FLOAT | Result is 0.0
# |
| NULL | TEXT | Result is NULL pointer
@@ -3492,19 +3417,19 @@ class Context < FFI::Struct
# |
| BLOB | TEXT | Add a zero terminator if needed
# |
#
)^
- #
+
# The table above makes reference to standard C library functions atoi()
# and atof(). SQLite does not really use these functions. It has its
# own equivalent internal routines. The atoi() and atof() names are
# used in the table for brevity and because they are familiar to most
# C programmers.
- #
+
# Note that when type conversions occur, pointers returned by prior
# calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
# sqlite3_column_text16() may be invalidated.
# Type conversions and pointer invalidations might occur
# in the following cases:
- #
+
#
# - The initial content is a BLOB and sqlite3_column_text() or
# sqlite3_column_text16() is called. A zero-terminator might
@@ -3516,22 +3441,22 @@ class Context < FFI::Struct
# sqlite3_column_text() is called. The content must be converted
# to UTF-8.
#
- #
+
# ^Conversions between UTF-16be and UTF-16le are always done in place and do
# not invalidate a prior pointer, though of course the content of the buffer
# that the prior pointer references will have been modified. Other kinds
# of conversion are done in place when it is possible, but sometimes they
# are not possible and in those cases prior pointers are invalidated.
- #
+
# The safest and easiest to remember policy is to invoke these routines
# in one of the following ways:
- #
+
#
# - sqlite3_column_text() followed by sqlite3_column_bytes()
# - sqlite3_column_blob() followed by sqlite3_column_bytes()
# - sqlite3_column_text16() followed by sqlite3_column_bytes16()
#
- #
+
# In other words, you should call sqlite3_column_text(),
# sqlite3_column_blob(), or sqlite3_column_text16() first to force the result
# into the desired format, then invoke sqlite3_column_bytes() or
@@ -3539,172 +3464,160 @@ class Context < FFI::Struct
# to sqlite3_column_text() or sqlite3_column_blob() with calls to
# sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()
# with calls to sqlite3_column_bytes().
- #
+
# ^The pointers returned are valid until a type conversion occurs as
# described above, or until (sqlite3_step()) or (sqlite3_reset()) or
# (sqlite3_finalize()) is called. ^The memory space used to hold strings
# and BLOBs is freed automatically. Do not pass the pointers returned
# (sqlite3_column_blob()), (sqlite3_column_text()), etc. into
# (sqlite3_free()).
- #
+
# ^(If a memory allocation error occurs during the evaluation of any
# of these routines, a default value is returned. The default value
# is either the integer 0, the floating point number 0.0, or a NULL
# pointer. Subsequent calls to (sqlite3_errcode()) will return
# (SQLITE_NOMEM).)^
- #
+
# @method column_blob(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [FFI::Pointer(*Void)]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :column_blob, :sqlite3_column_blob, [Stmt, :int], :pointer
-
# (Not documented)
- #
+
# @method column_bytes(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [Integer]
# @scope class
attach_function :column_bytes, :sqlite3_column_bytes, [Stmt, :int], :int
-
# (Not documented)
- #
+
# @method column_bytes16(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [Integer]
# @scope class
attach_function :column_bytes16, :sqlite3_column_bytes16, [Stmt, :int], :int
-
# (Not documented)
- #
+
# @method column_double(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [Float]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [Float]
# @scope class
attach_function :column_double, :sqlite3_column_double, [Stmt, :int], :double
-
# (Not documented)
- #
+
# @method column_int(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [Integer]
# @scope class
attach_function :column_int, :sqlite3_column_int, [Stmt, :int], :int
-
# (Not documented)
- #
+
# @method column_int64(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [Integer]
# @scope class
attach_function :column_int64, :sqlite3_column_int64, [Stmt, :int], :long_long
-
# (Not documented)
- #
+
# @method column_text(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [FFI::Pointer(*UChar)]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [FFI::Pointer(*UChar)]
# @scope class
attach_function :column_text, :sqlite3_column_text, [Stmt, :int], :pointer
-
# (Not documented)
- #
+
# @method column_text16(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [FFI::Pointer(*Void)]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :column_text16, :sqlite3_column_text16, [Stmt, :int], :pointer
-
# (Not documented)
- #
+
# @method column_type(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [Integer]
# @scope class
attach_function :column_type, :sqlite3_column_type, [Stmt, :int], :int
-
# (Not documented)
- #
+
# @method column_value(stmt, i_col)
- # @param [Stmt] stmt
- # @param [Integer] i_col
- # @return [Mem]
+ # @param [Stmt] stmt
+ # @param [Integer] i_col
+ # @return [Mem]
# @scope class
attach_function :column_value, :sqlite3_column_value, [Stmt, :int], Mem
-
# CAPI3REF: Destroy A Prepared Statement Object
- #
+
# ^The sqlite3_finalize() function is called to delete a (prepared statement).
# ^If the most recent evaluation of the statement encountered no errors
# or if the statement is never been evaluated, then sqlite3_finalize() returns
# SQLITE_OK. ^If the most recent evaluation of statement S failed, then
# sqlite3_finalize(S) returns the appropriate (error code) or
# (extended error code).
- #
+
# ^The sqlite3_finalize(S) routine can be called at any point during
# the life cycle of (prepared statement) S:
# before statement S is ever evaluated, after
# one or more calls to (sqlite3_reset()), or after any call
# to (sqlite3_step()) regardless of whether or not the statement has
# completed execution.
- #
+
# ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.
- #
+
# The application must finalize every (prepared statement) in order to avoid
# resource leaks. It is a grievous error for the application to try to use
# a prepared statement after it has been finalized. Any use of a prepared
# statement after it has been finalized can result in undefined and
# undesirable behavior such as segfaults and heap corruption.
- #
+
# @method finalize(p_stmt)
- # @param [Stmt] p_stmt
- # @return [Integer]
+ # @param [Stmt] p_stmt
+ # @return [Integer]
# @scope class
attach_function :finalize, :sqlite3_finalize, [Stmt], :int
-
# CAPI3REF: Reset A Prepared Statement Object
- #
+
# The sqlite3_reset() function is called to reset a (prepared statement)
# object back to its initial state, ready to be re-executed.
# ^Any SQL statement variables that had values bound to them using
# the (sqlite3_bind_blob | sqlite3_bind_*() API) retain their values.
# Use (sqlite3_clear_bindings()) to reset the bindings.
- #
+
# ^The (sqlite3_reset(S)) interface resets the (prepared statement) S
# back to the beginning of its program.
- #
+
# ^If the most recent call to (sqlite3_step(S)) for the
# (prepared statement) S returned (SQLITE_ROW) or (SQLITE_DONE),
# or if (sqlite3_step(S)) has never before been called on S,
# then (sqlite3_reset(S)) returns (SQLITE_OK).
- #
+
# ^If the most recent call to (sqlite3_step(S)) for the
# (prepared statement) S indicated an error, then
# (sqlite3_reset(S)) returns an appropriate (error code).
- #
+
# ^The (sqlite3_reset(S)) interface does not change the values
# of any (sqlite3_bind_blob|bindings) on the (prepared statement) S.
- #
+
# @method reset(p_stmt)
- # @param [Stmt] p_stmt
- # @return [Integer]
+ # @param [Stmt] p_stmt
+ # @return [Integer]
# @scope class
attach_function :reset, :sqlite3_reset, [Stmt], :int
-
# CAPI3REF: Create Or Redefine SQL Functions
# KEYWORDS: {function creation routines}
# KEYWORDS: {application-defined SQL function}
# KEYWORDS: {application-defined SQL functions}
- #
+
# ^These functions (collectively known as "function creation routines")
# are used to add SQL functions or aggregates or to redefine the behavior
# of existing SQL functions or aggregates. The only differences between
@@ -3712,19 +3625,19 @@ class Context < FFI::Struct
# the second parameter (the name of the function being created)
# and the presence or absence of a destructor callback for
# the application data pointer.
- #
+
# ^The first parameter is the (database connection) to which the SQL
# function is to be added. ^If an application uses more than one database
# connection then application-defined SQL functions must be added
# to each database connection separately.
- #
+
# ^The second parameter is the name of the SQL function to be created or
# redefined. ^The length of the name is limited to 255 bytes in a UTF-8
# representation, exclusive of the zero-terminator. ^Note that the name
# length limit is in UTF-8 bytes, not characters nor UTF-16 bytes.
# ^Any attempt to create a function with a longer name
# will result in (SQLITE_MISUSE) being returned.
- #
+
# ^The third parameter (nArg)
# is the number of arguments that the SQL function or
# aggregate takes. ^If this parameter is -1, then the SQL function or
@@ -3732,7 +3645,7 @@ class Context < FFI::Struct
# set by (sqlite3_limit)((SQLITE_LIMIT_FUNCTION_ARG)). If the third
# parameter is less than -1 or greater than 127 then the behavior is
# undefined.
- #
+
# ^The fourth parameter, eTextRep, specifies what
# (SQLITE_UTF8 | text encoding) this SQL function prefers for
# its parameters. Every SQL function implementation must be able to work
@@ -3744,10 +3657,10 @@ class Context < FFI::Struct
# will pick the one that involves the least amount of data conversion.
# If there is only a single implementation which does not care what text
# encoding is used, then the fourth argument should be (SQLITE_ANY).
- #
+
# ^(The fifth parameter is an arbitrary pointer. The implementation of the
# function can gain access to this pointer using (sqlite3_user_data()).)^
- #
+
# ^The sixth, seventh and eighth parameters, xFunc, xStep and xFinal, are
# pointers to C-language functions that implement the SQL function or
# aggregate. ^A scalar SQL function requires an implementation of the xFunc
@@ -3756,7 +3669,7 @@ class Context < FFI::Struct
# and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing
# SQL function or aggregate, pass NULL pointers for all three function
# callbacks.
- #
+
# ^(If the ninth parameter to sqlite3_create_function_v2() is not NULL,
# then it is destructor for the application data pointer.
# The destructor is invoked when the function is deleted, either by being
@@ -3766,7 +3679,7 @@ class Context < FFI::Struct
# ^When the destructor callback of the tenth parameter is invoked, it
# is passed a single argument which is a copy of the application data
# pointer which was the fifth parameter to sqlite3_create_function_v2().
- #
+
# ^It is permitted to register multiple implementations of the same
# functions with the same name but with either differing numbers of
# arguments or differing preferred text encodings. ^SQLite will use
@@ -3779,120 +3692,111 @@ class Context < FFI::Struct
# ^A function where the encoding difference is between UTF16le and UTF16be
# is a closer match than a function where the encoding difference is
# between UTF8 and UTF16.
- #
+
# ^Built-in functions may be overloaded by new application-defined functions.
- #
+
# ^An application-defined function is permitted to call other
# SQLite interfaces. However, such calls must not
# close the database connection nor finalize or reset the prepared
# statement in which the function is running.
- #
+
# @method create_function(db, z_function_name, n_arg, e_text_rep, p_app, x_func, x_step, x_final)
- # @param [Sqlite3] db
- # @param [String] z_function_name
- # @param [Integer] n_arg
- # @param [Integer] e_text_rep
- # @param [FFI::Pointer(*Void)] p_app
- # @param [FFI::Pointer(*)] x_func
- # @param [FFI::Pointer(*)] x_step
- # @param [FFI::Pointer(*)] x_final
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_function_name
+ # @param [Integer] n_arg
+ # @param [Integer] e_text_rep
+ # @param [FFI::Pointer(*Void)] p_app
+ # @param [FFI::Pointer(*FunctionProto)] x_func
+ # @param [FFI::Pointer(*FunctionProto)] x_step
+ # @param [FFI::Pointer(*FunctionProto)] x_final
+ # @return [Integer]
# @scope class
attach_function :create_function, :sqlite3_create_function, [Sqlite3, :string, :int, :int, :pointer, :pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method create_function16(db, z_function_name, n_arg, e_text_rep, p_app, x_func, x_step, x_final)
- # @param [Sqlite3] db
- # @param [FFI::Pointer(*Void)] z_function_name
- # @param [Integer] n_arg
- # @param [Integer] e_text_rep
- # @param [FFI::Pointer(*Void)] p_app
- # @param [FFI::Pointer(*)] x_func
- # @param [FFI::Pointer(*)] x_step
- # @param [FFI::Pointer(*)] x_final
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [FFI::Pointer(*Void)] z_function_name
+ # @param [Integer] n_arg
+ # @param [Integer] e_text_rep
+ # @param [FFI::Pointer(*Void)] p_app
+ # @param [FFI::Pointer(*FunctionProto)] x_func
+ # @param [FFI::Pointer(*FunctionProto)] x_step
+ # @param [FFI::Pointer(*FunctionProto)] x_final
+ # @return [Integer]
# @scope class
attach_function :create_function16, :sqlite3_create_function16, [Sqlite3, :pointer, :int, :int, :pointer, :pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method create_function_v2(db, z_function_name, n_arg, e_text_rep, p_app, x_func, x_step, x_final, x_destroy)
- # @param [Sqlite3] db
- # @param [String] z_function_name
- # @param [Integer] n_arg
- # @param [Integer] e_text_rep
- # @param [FFI::Pointer(*Void)] p_app
- # @param [FFI::Pointer(*)] x_func
- # @param [FFI::Pointer(*)] x_step
- # @param [FFI::Pointer(*)] x_final
- # @param [FFI::Pointer(*)] x_destroy
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_function_name
+ # @param [Integer] n_arg
+ # @param [Integer] e_text_rep
+ # @param [FFI::Pointer(*Void)] p_app
+ # @param [FFI::Pointer(*FunctionProto)] x_func
+ # @param [FFI::Pointer(*FunctionProto)] x_step
+ # @param [FFI::Pointer(*FunctionProto)] x_final
+ # @param [FFI::Pointer(*FunctionProto)] x_destroy
+ # @return [Integer]
# @scope class
attach_function :create_function_v2, :sqlite3_create_function_v2, [Sqlite3, :string, :int, :int, :pointer, :pointer, :pointer, :pointer, :pointer], :int
-
# CAPI3REF: Deprecated Functions
# DEPRECATED
- #
+
# These functions are (deprecated). In order to maintain
# backwards compatibility with older code, these functions continue
# to be supported. However, new applications should avoid
# the use of these functions. To help encourage people to avoid
# using these functions, we are not going to tell you what they do.
- #
+
# @method aggregate_count(context)
- # @param [Context] context
- # @return [Integer]
+ # @param [Context] context
+ # @return [Integer]
# @scope class
attach_function :aggregate_count, :sqlite3_aggregate_count, [Context], :int
-
# (Not documented)
- #
+
# @method expired(stmt)
- # @param [Stmt] stmt
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @return [Integer]
# @scope class
attach_function :expired, :sqlite3_expired, [Stmt], :int
-
# (Not documented)
- #
+
# @method transfer_bindings(stmt, stmt)
- # @param [Stmt] stmt
- # @param [Stmt] stmt
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Stmt] stmt
+ # @return [Integer]
# @scope class
attach_function :transfer_bindings, :sqlite3_transfer_bindings, [Stmt, Stmt], :int
-
# (Not documented)
- #
+
# @method global_recover()
- # @return [Integer]
+ # @return [Integer]
# @scope class
attach_function :global_recover, :sqlite3_global_recover, [], :int
-
# (Not documented)
- #
+
# @method thread_cleanup()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :thread_cleanup, :sqlite3_thread_cleanup, [], :void
-
# (Not documented)
- #
- # @method memory_alarm(, void, long_long)
- # @param [FFI::Pointer(*)]
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] long_long
- # @return [Integer]
+
+ # @method memory_alarm(functionproto, void, long_long)
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] long_long
+ # @return [Integer]
# @scope class
attach_function :memory_alarm, :sqlite3_memory_alarm, [:pointer, :pointer, :long_long], :int
-
# CAPI3REF: Obtaining SQL Function Parameter Values
- #
+
# The C-language implementation of SQL functions and aggregates uses
# this set of interface routines to access the parameter values on
# the function or aggregate.
- #
+
# The xFunc (for scalar functions) or xStep (for aggregates) parameters
# to (sqlite3_create_function()) and (sqlite3_create_function16())
# define callbacks that implement the SQL functions and aggregates.
@@ -3900,20 +3804,20 @@ class Context < FFI::Struct
# (protected sqlite3_value) objects. There is one (sqlite3_value) object for
# each parameter to the SQL function. These routines are used to
# extract values from the (sqlite3_value) objects.
- #
+
# These routines work only with (protected sqlite3_value) objects.
# Any attempt to use these routines on an (unprotected sqlite3_value)
# object results in undefined behavior.
- #
+
# ^These routines work just like the corresponding (column access functions)
# except that these routines take a single (protected sqlite3_value) object
# pointer instead of a (sqlite3_stmt*) pointer and an integer column number.
- #
+
# ^The sqlite3_value_text16() interface extracts a UTF-16 string
# in the native byte-order of the host machine. ^The
# sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
# extract UTF-16 strings as big-endian and little-endian respectively.
- #
+
# ^(The sqlite3_value_numeric_type() interface attempts to apply
# numeric affinity to the value. This means that an attempt is
# made to convert the value to an integer or floating point. If
@@ -3921,115 +3825,103 @@ class Context < FFI::Struct
# words, if the value is a string that looks like a number)
# then the conversion is performed. Otherwise no conversion occurs.
# The (SQLITE_INTEGER | datatype) after conversion is returned.)^
- #
+
# Please pay particular attention to the fact that the pointer returned
# from (sqlite3_value_blob()), (sqlite3_value_text()), or
# (sqlite3_value_text16()) can be invalidated by a subsequent call to
# (sqlite3_value_bytes()), (sqlite3_value_bytes16()), (sqlite3_value_text()),
# or (sqlite3_value_text16()).
- #
+
# These routines must be called from the same thread as
# the SQL function that supplied the (sqlite3_value*) parameters.
- #
+
# @method value_blob(mem)
- # @param [Mem] mem
- # @return [FFI::Pointer(*Void)]
+ # @param [Mem] mem
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :value_blob, :sqlite3_value_blob, [Mem], :pointer
-
# (Not documented)
- #
+
# @method value_bytes(mem)
- # @param [Mem] mem
- # @return [Integer]
+ # @param [Mem] mem
+ # @return [Integer]
# @scope class
attach_function :value_bytes, :sqlite3_value_bytes, [Mem], :int
-
# (Not documented)
- #
+
# @method value_bytes16(mem)
- # @param [Mem] mem
- # @return [Integer]
+ # @param [Mem] mem
+ # @return [Integer]
# @scope class
attach_function :value_bytes16, :sqlite3_value_bytes16, [Mem], :int
-
# (Not documented)
- #
+
# @method value_double(mem)
- # @param [Mem] mem
- # @return [Float]
+ # @param [Mem] mem
+ # @return [Float]
# @scope class
attach_function :value_double, :sqlite3_value_double, [Mem], :double
-
# (Not documented)
- #
+
# @method value_int(mem)
- # @param [Mem] mem
- # @return [Integer]
+ # @param [Mem] mem
+ # @return [Integer]
# @scope class
attach_function :value_int, :sqlite3_value_int, [Mem], :int
-
# (Not documented)
- #
+
# @method value_int64(mem)
- # @param [Mem] mem
- # @return [Integer]
+ # @param [Mem] mem
+ # @return [Integer]
# @scope class
attach_function :value_int64, :sqlite3_value_int64, [Mem], :long_long
-
# (Not documented)
- #
+
# @method value_text(mem)
- # @param [Mem] mem
- # @return [FFI::Pointer(*UChar)]
+ # @param [Mem] mem
+ # @return [FFI::Pointer(*UChar)]
# @scope class
attach_function :value_text, :sqlite3_value_text, [Mem], :pointer
-
# (Not documented)
- #
+
# @method value_text16(mem)
- # @param [Mem] mem
- # @return [FFI::Pointer(*Void)]
+ # @param [Mem] mem
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :value_text16, :sqlite3_value_text16, [Mem], :pointer
-
# (Not documented)
- #
+
# @method value_text16le(mem)
- # @param [Mem] mem
- # @return [FFI::Pointer(*Void)]
+ # @param [Mem] mem
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :value_text16le, :sqlite3_value_text16le, [Mem], :pointer
-
# (Not documented)
- #
+
# @method value_text16be(mem)
- # @param [Mem] mem
- # @return [FFI::Pointer(*Void)]
+ # @param [Mem] mem
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :value_text16be, :sqlite3_value_text16be, [Mem], :pointer
-
# (Not documented)
- #
+
# @method value_type(mem)
- # @param [Mem] mem
- # @return [Integer]
+ # @param [Mem] mem
+ # @return [Integer]
# @scope class
attach_function :value_type, :sqlite3_value_type, [Mem], :int
-
# (Not documented)
- #
+
# @method value_numeric_type(mem)
- # @param [Mem] mem
- # @return [Integer]
+ # @param [Mem] mem
+ # @return [Integer]
# @scope class
attach_function :value_numeric_type, :sqlite3_value_numeric_type, [Mem], :int
-
# CAPI3REF: Obtain Aggregate Function Context
- #
+
# Implementations of aggregate SQL functions use this
# routine to allocate memory for storing their state.
- #
+
# ^The first time the sqlite3_aggregate_context(C,N) routine is called
# for a particular aggregate function, SQLite
# allocates N of memory, zeroes out that memory, and returns a pointer
@@ -4042,67 +3934,64 @@ class Context < FFI::Struct
# implementation is never called and xFinal() is called exactly once.
# In those cases, sqlite3_aggregate_context() might be called for the
# first time from within xFinal().)^
- #
+
# ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is
# less than or equal to zero or if a memory allocate error occurs.
- #
+
# ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
# determined by the N parameter on first successful call. Changing the
# value of N in subsequent call to sqlite3_aggregate_context() within
# the same aggregate function instance will not resize the memory
# allocation.)^
- #
+
# ^SQLite automatically frees the memory allocated by
# sqlite3_aggregate_context() when the aggregate query concludes.
- #
+
# The first parameter must be a copy of the
# (sqlite3_context | SQL function context) that is the first parameter
# to the xStep or xFinal callback routine that implements the aggregate
# function.
- #
+
# This routine must be called from the same thread in which
# the aggregate SQL function is running.
- #
+
# @method aggregate_context(context, n_bytes)
- # @param [Context] context
- # @param [Integer] n_bytes
- # @return [FFI::Pointer(*Void)]
+ # @param [Context] context
+ # @param [Integer] n_bytes
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :aggregate_context, :sqlite3_aggregate_context, [Context, :int], :pointer
-
# CAPI3REF: User Data For Functions
- #
+
# ^The sqlite3_user_data() interface returns a copy of
# the pointer that was the pUserData parameter (the 5th parameter)
# of the (sqlite3_create_function())
# and (sqlite3_create_function16()) routines that originally
# registered the application defined function.
- #
+
# This routine must be called from the same thread in which
# the application-defined function is running.
- #
+
# @method user_data(context)
- # @param [Context] context
- # @return [FFI::Pointer(*Void)]
+ # @param [Context] context
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :user_data, :sqlite3_user_data, [Context], :pointer
-
# CAPI3REF: Database Connection For Functions
- #
+
# ^The sqlite3_context_db_handle() interface returns a copy of
# the pointer to the (database connection) (the 1st parameter)
# of the (sqlite3_create_function())
# and (sqlite3_create_function16()) routines that originally
# registered the application defined function.
- #
+
# @method context_db_handle(context)
- # @param [Context] context
- # @return [Sqlite3]
+ # @param [Context] context
+ # @return [Sqlite3]
# @scope class
attach_function :context_db_handle, :sqlite3_context_db_handle, [Context], Sqlite3
-
# CAPI3REF: Function Auxiliary Data
- #
+
# The following two functions may be used by scalar SQL functions to
# associate metadata with argument values. If the same value is passed to
# multiple invocations of the same SQL function during query execution, under
@@ -4113,14 +4002,14 @@ class Context < FFI::Struct
# pattern. The compiled regular expression can be reused on multiple
# invocations of the same function so that the original pattern string
# does not need to be recompiled on each invocation.
- #
+
# ^The sqlite3_get_auxdata() interface returns a pointer to the metadata
# associated by the sqlite3_set_auxdata() function with the Nth argument
# value to the application-defined function. ^If no metadata has been ever
# been set for the Nth argument of the function, or if the corresponding
# function parameter has changed since the meta-data was set,
# then sqlite3_get_auxdata() returns a NULL pointer.
- #
+
# ^The sqlite3_set_auxdata() interface saves the metadata
# pointed to by its 3rd parameter as the metadata for the N-th
# argument of the application-defined function. Subsequent
@@ -4130,60 +4019,58 @@ class Context < FFI::Struct
# function given by the 4th parameter to sqlite3_set_auxdata() on
# the metadata when the corresponding function parameter changes
# or when the SQL statement completes, whichever comes first.
- #
+
# SQLite is free to call the destructor and drop metadata on any
# parameter of any function at any time. ^The only guarantee is that
# the destructor will be called before the metadata is dropped.
- #
+
# ^(In practice, metadata is preserved between function calls for
# expressions that are constant at compile time. This includes literal
# values and (parameters).)^
- #
+
# These routines must be called from the same thread in which
# the SQL function is running.
- #
+
# @method get_auxdata(context, n)
- # @param [Context] context
- # @param [Integer] n
- # @return [FFI::Pointer(*Void)]
+ # @param [Context] context
+ # @param [Integer] n
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :get_auxdata, :sqlite3_get_auxdata, [Context, :int], :pointer
-
# (Not documented)
- #
- # @method set_auxdata(context, n, void, )
- # @param [Context] context
- # @param [Integer] n
- # @param [FFI::Pointer(*Void)] void
- # @param [FFI::Pointer(*)]
- # @return [nil]
+
+ # @method set_auxdata(context, n, void, functionproto)
+ # @param [Context] context
+ # @param [Integer] n
+ # @param [FFI::Pointer(*Void)] void
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [nil]
# @scope class
attach_function :set_auxdata, :sqlite3_set_auxdata, [Context, :int, :pointer, :pointer], :void
-
# CAPI3REF: Setting The Result Of An SQL Function
- #
+
# These routines are used by the xFunc or xFinal callbacks that
# implement SQL functions and aggregates. See
# (sqlite3_create_function()) and (sqlite3_create_function16())
# for additional information.
- #
+
# These functions work very much like the (parameter binding) family of
# functions used to bind values to host parameters in prepared statements.
# Refer to the (SQL parameter) documentation for additional information.
- #
+
# ^The sqlite3_result_blob() interface sets the result from
# an application-defined function to be the BLOB whose content is pointed
# to by the second parameter and which is N bytes long where N is the
# third parameter.
- #
+
# ^The sqlite3_result_zeroblob() interfaces set the result of
# the application-defined function to be a BLOB containing all zero
# bytes and N bytes in size, where N is the value of the 2nd parameter.
- #
+
# ^The sqlite3_result_double() interface sets the result from
# an application-defined function to be a floating point value specified
# by its 2nd argument.
- #
+
# ^The sqlite3_result_error() and sqlite3_result_error16() functions
# cause the implemented SQL function to throw an exception.
# ^SQLite uses the string pointed to by the
@@ -4205,23 +4092,23 @@ class Context < FFI::Struct
# returned by SQLite as a result of an error in a function. ^By default,
# the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error()
# or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
- #
+
# ^The sqlite3_result_toobig() interface causes SQLite to throw an error
# indicating that a string or BLOB is too long to represent.
- #
+
# ^The sqlite3_result_nomem() interface causes SQLite to throw an error
# indicating that a memory allocation failed.
- #
+
# ^The sqlite3_result_int() interface sets the return value
# of the application-defined function to be the 32-bit signed integer
# value given in the 2nd argument.
# ^The sqlite3_result_int64() interface sets the return value
# of the application-defined function to be the 64-bit signed integer
# value given in the 2nd argument.
- #
+
# ^The sqlite3_result_null() interface sets the return value
# of the application-defined function to be NULL.
- #
+
# ^The sqlite3_result_text(), sqlite3_result_text16(),
# sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
# set the return value of the application-defined function to be
@@ -4254,7 +4141,7 @@ class Context < FFI::Struct
# or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
# then SQLite makes a copy of the result into space obtained from
# from (sqlite3_malloc()) before it returns.
- #
+
# ^The sqlite3_result_value() interface sets the result of
# the application-defined function to be a copy the
# (unprotected sqlite3_value) object specified by the 2nd parameter. ^The
@@ -4264,173 +4151,157 @@ class Context < FFI::Struct
# ^A (protected sqlite3_value) object may always be used where an
# (unprotected sqlite3_value) object is required, so either
# kind of (sqlite3_value) object can be used with this interface.
- #
+
# If these routines are called from within the different thread
# than the one containing the application-defined function that received
# the (sqlite3_context) pointer, the results are undefined.
- #
- # @method result_blob(context, void, int, )
- # @param [Context] context
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] int
- # @param [FFI::Pointer(*)]
- # @return [nil]
+
+ # @method result_blob(context, void, int, functionproto)
+ # @param [Context] context
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] int
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [nil]
# @scope class
attach_function :result_blob, :sqlite3_result_blob, [Context, :pointer, :int, :pointer], :void
-
# (Not documented)
- #
+
# @method result_double(context, double)
- # @param [Context] context
- # @param [Float] double
- # @return [nil]
+ # @param [Context] context
+ # @param [Float] double
+ # @return [nil]
# @scope class
attach_function :result_double, :sqlite3_result_double, [Context, :double], :void
-
# (Not documented)
- #
+
# @method result_error(context, string, int)
- # @param [Context] context
- # @param [String] string
- # @param [Integer] int
- # @return [nil]
+ # @param [Context] context
+ # @param [String] string
+ # @param [Integer] int
+ # @return [nil]
# @scope class
attach_function :result_error, :sqlite3_result_error, [Context, :string, :int], :void
-
# (Not documented)
- #
+
# @method result_error16(context, void, int)
- # @param [Context] context
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] int
- # @return [nil]
+ # @param [Context] context
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] int
+ # @return [nil]
# @scope class
attach_function :result_error16, :sqlite3_result_error16, [Context, :pointer, :int], :void
-
# (Not documented)
- #
+
# @method result_error_toobig(context)
- # @param [Context] context
- # @return [nil]
+ # @param [Context] context
+ # @return [nil]
# @scope class
attach_function :result_error_toobig, :sqlite3_result_error_toobig, [Context], :void
-
# (Not documented)
- #
+
# @method result_error_nomem(context)
- # @param [Context] context
- # @return [nil]
+ # @param [Context] context
+ # @return [nil]
# @scope class
attach_function :result_error_nomem, :sqlite3_result_error_nomem, [Context], :void
-
# (Not documented)
- #
+
# @method result_error_code(context, int)
- # @param [Context] context
- # @param [Integer] int
- # @return [nil]
+ # @param [Context] context
+ # @param [Integer] int
+ # @return [nil]
# @scope class
attach_function :result_error_code, :sqlite3_result_error_code, [Context, :int], :void
-
# (Not documented)
- #
+
# @method result_int(context, int)
- # @param [Context] context
- # @param [Integer] int
- # @return [nil]
+ # @param [Context] context
+ # @param [Integer] int
+ # @return [nil]
# @scope class
attach_function :result_int, :sqlite3_result_int, [Context, :int], :void
-
# (Not documented)
- #
+
# @method result_int64(context, long_long)
- # @param [Context] context
- # @param [Integer] long_long
- # @return [nil]
+ # @param [Context] context
+ # @param [Integer] long_long
+ # @return [nil]
# @scope class
attach_function :result_int64, :sqlite3_result_int64, [Context, :long_long], :void
-
# (Not documented)
- #
+
# @method result_null(context)
- # @param [Context] context
- # @return [nil]
+ # @param [Context] context
+ # @return [nil]
# @scope class
attach_function :result_null, :sqlite3_result_null, [Context], :void
-
# (Not documented)
- #
- # @method result_text(context, string, int, )
- # @param [Context] context
- # @param [String] string
- # @param [Integer] int
- # @param [FFI::Pointer(*)]
- # @return [nil]
+
+ # @method result_text(context, string, int, functionproto)
+ # @param [Context] context
+ # @param [String] string
+ # @param [Integer] int
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [nil]
# @scope class
attach_function :result_text, :sqlite3_result_text, [Context, :string, :int, :pointer], :void
-
# (Not documented)
- #
- # @method result_text16(context, void, int, )
- # @param [Context] context
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] int
- # @param [FFI::Pointer(*)]
- # @return [nil]
+
+ # @method result_text16(context, void, int, functionproto)
+ # @param [Context] context
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] int
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [nil]
# @scope class
attach_function :result_text16, :sqlite3_result_text16, [Context, :pointer, :int, :pointer], :void
-
# (Not documented)
- #
- # @method result_text16le(context, void, int, )
- # @param [Context] context
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] int
- # @param [FFI::Pointer(*)]
- # @return [nil]
+
+ # @method result_text16le(context, void, int, functionproto)
+ # @param [Context] context
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] int
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [nil]
# @scope class
attach_function :result_text16le, :sqlite3_result_text16le, [Context, :pointer, :int, :pointer], :void
-
# (Not documented)
- #
- # @method result_text16be(context, void, int, )
- # @param [Context] context
- # @param [FFI::Pointer(*Void)] void
- # @param [Integer] int
- # @param [FFI::Pointer(*)]
- # @return [nil]
+
+ # @method result_text16be(context, void, int, functionproto)
+ # @param [Context] context
+ # @param [FFI::Pointer(*Void)] void
+ # @param [Integer] int
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [nil]
# @scope class
attach_function :result_text16be, :sqlite3_result_text16be, [Context, :pointer, :int, :pointer], :void
-
# (Not documented)
- #
+
# @method result_value(context, mem)
- # @param [Context] context
- # @param [Mem] mem
- # @return [nil]
+ # @param [Context] context
+ # @param [Mem] mem
+ # @return [nil]
# @scope class
attach_function :result_value, :sqlite3_result_value, [Context, Mem], :void
-
# (Not documented)
- #
+
# @method result_zeroblob(context, n)
- # @param [Context] context
- # @param [Integer] n
- # @return [nil]
+ # @param [Context] context
+ # @param [Integer] n
+ # @return [nil]
# @scope class
attach_function :result_zeroblob, :sqlite3_result_zeroblob, [Context, :int], :void
-
# CAPI3REF: Define New Collating Sequences
- #
+
# ^These functions add, remove, or modify a (collation) associated
# with the (database connection) specified as the first argument.
- #
+
# ^The name of the collation is a UTF-8 string
# for sqlite3_create_collation() and sqlite3_create_collation_v2()
# and a UTF-16 string in native byte order for sqlite3_create_collation16().
# ^Collation names that compare equal according to (sqlite3_strnicmp()) are
# considered to be the same name.
- #
+
# ^(The third argument (eTextRep) must be one of the constants:
#
# - (SQLITE_UTF8),
@@ -4445,10 +4316,10 @@ class Context < FFI::Struct
# force strings to be UTF16 with native byte order.
# ^The (SQLITE_UTF16_ALIGNED) value for eTextRep forces strings to begin
# on an even byte address.
- #
+
# ^The fourth argument, pArg, is an application data pointer that is passed
# through as the first argument to the collating function callback.
- #
+
# ^The fifth argument, xCallback, is a pointer to the collating function.
# ^Multiple collating functions can be registered using the same name but
# with different eTextRep parameters and SQLite will use whichever
@@ -4456,7 +4327,7 @@ class Context < FFI::Struct
# ^If the xCallback argument is NULL then the collating function is
# deleted. ^When all collating functions having the same name are deleted,
# that collation is no longer usable.
- #
+
# ^The collating function callback is invoked with a copy of the pArg
# application data pointer and with two strings in the encoding specified
# by the eTextRep argument. The collating function must return an
@@ -4468,25 +4339,25 @@ class Context < FFI::Struct
# must give an equivalent answer when invoked with equivalent strings.
# The collating function must obey the following properties for all
# strings A, B, and C:
- #
+
#
# - If A==B then B==A.
#
- If A==B and B==C then A==C.
#
- If A<B THEN B>A.
#
- If A<B and B<C then A<C.
#
- #
+
# If a collating function fails any of the above constraints and that
# collating function is registered and used, then the behavior of SQLite
# is undefined.
- #
+
# ^The sqlite3_create_collation_v2() works like sqlite3_create_collation()
# with the addition that the xDestroy callback is invoked on pArg when
# the collating function is deleted.
# ^Collating functions are deleted when they are overridden by later
# calls to the collation creation functions or when the
# (database connection) is closed using (sqlite3_close()).
- #
+
# ^The xDestroy callback is not called if the
# sqlite3_create_collation_v2() function fails. Applications that invoke
# sqlite3_create_collation_v2() with a non-NULL xDestroy argument should
@@ -4495,57 +4366,54 @@ class Context < FFI::Struct
# This is different from every other SQLite interface. The inconsistency
# is unfortunate but cannot be changed without breaking backwards
# compatibility.
- #
+
# See also: (sqlite3_collation_needed()) and (sqlite3_collation_needed16()).
- #
+
# @method create_collation(sqlite3, z_name, e_text_rep, p_arg, x_compare)
- # @param [Sqlite3] sqlite3
- # @param [String] z_name
- # @param [Integer] e_text_rep
- # @param [FFI::Pointer(*Void)] p_arg
- # @param [FFI::Pointer(*)] x_compare
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [String] z_name
+ # @param [Integer] e_text_rep
+ # @param [FFI::Pointer(*Void)] p_arg
+ # @param [FFI::Pointer(*FunctionProto)] x_compare
+ # @return [Integer]
# @scope class
attach_function :create_collation, :sqlite3_create_collation, [Sqlite3, :string, :int, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method create_collation_v2(sqlite3, z_name, e_text_rep, p_arg, x_compare, x_destroy)
- # @param [Sqlite3] sqlite3
- # @param [String] z_name
- # @param [Integer] e_text_rep
- # @param [FFI::Pointer(*Void)] p_arg
- # @param [FFI::Pointer(*)] x_compare
- # @param [FFI::Pointer(*)] x_destroy
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [String] z_name
+ # @param [Integer] e_text_rep
+ # @param [FFI::Pointer(*Void)] p_arg
+ # @param [FFI::Pointer(*FunctionProto)] x_compare
+ # @param [FFI::Pointer(*FunctionProto)] x_destroy
+ # @return [Integer]
# @scope class
attach_function :create_collation_v2, :sqlite3_create_collation_v2, [Sqlite3, :string, :int, :pointer, :pointer, :pointer], :int
-
# (Not documented)
- #
+
# @method create_collation16(sqlite3, z_name, e_text_rep, p_arg, x_compare)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*Void)] z_name
- # @param [Integer] e_text_rep
- # @param [FFI::Pointer(*Void)] p_arg
- # @param [FFI::Pointer(*)] x_compare
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*Void)] z_name
+ # @param [Integer] e_text_rep
+ # @param [FFI::Pointer(*Void)] p_arg
+ # @param [FFI::Pointer(*FunctionProto)] x_compare
+ # @return [Integer]
# @scope class
attach_function :create_collation16, :sqlite3_create_collation16, [Sqlite3, :pointer, :int, :pointer, :pointer], :int
-
# CAPI3REF: Collation Needed Callbacks
- #
+
# ^To avoid having to register all collation sequences before a database
# can be used, a single callback function may be registered with the
# (database connection) to be invoked whenever an undefined collation
# sequence is required.
- #
+
# ^If the function is registered using the sqlite3_collation_needed() API,
# then it is passed the names of undefined collation sequences as strings
# encoded in UTF-8. ^If sqlite3_collation_needed16() is used,
# the names are passed as UTF-16 in machine native byte order.
# ^A call to either function replaces the existing collation-needed callback.
- #
+
# ^(When the callback is invoked, the first argument passed is a copy
# of the second argument to sqlite3_collation_needed() or
# sqlite3_collation_needed16(). The second argument is the database
@@ -4553,113 +4421,107 @@ class Context < FFI::Struct
# or (SQLITE_UTF16LE), indicating the most desirable form of the collation
# sequence function required. The fourth parameter is the name of the
# required collation sequence.)^
- #
+
# The callback function should register the desired collation using
# (sqlite3_create_collation()), (sqlite3_create_collation16()), or
# (sqlite3_create_collation_v2()).
- #
- # @method collation_needed(sqlite3, void, )
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*Void)] void
- # @param [FFI::Pointer(*)]
- # @return [Integer]
+
+ # @method collation_needed(sqlite3, void, functionproto)
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*Void)] void
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [Integer]
# @scope class
attach_function :collation_needed, :sqlite3_collation_needed, [Sqlite3, :pointer, :pointer], :int
-
# (Not documented)
- #
- # @method collation_needed16(sqlite3, void, )
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*Void)] void
- # @param [FFI::Pointer(*)]
- # @return [Integer]
+
+ # @method collation_needed16(sqlite3, void, functionproto)
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*Void)] void
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @return [Integer]
# @scope class
attach_function :collation_needed16, :sqlite3_collation_needed16, [Sqlite3, :pointer, :pointer], :int
-
# CAPI3REF: Suspend Execution For A Short Time
- #
+
# The sqlite3_sleep() function causes the current thread to suspend execution
# for at least a number of milliseconds specified in its parameter.
- #
+
# If the operating system does not support sleep requests with
# millisecond time resolution, then the time will be rounded up to
# the nearest second. The number of milliseconds of sleep actually
# requested from the operating system is returned.
- #
+
# ^SQLite implements this interface by calling the xSleep()
# method of the default (sqlite3_vfs) object. If the xSleep() method
# of the default VFS is not implemented correctly, or not implemented at
# all, then the behavior of sqlite3_sleep() may deviate from the description
# in the previous paragraphs.
- #
+
# @method sleep(int)
- # @param [Integer] int
- # @return [Integer]
+ # @param [Integer] int
+ # @return [Integer]
# @scope class
attach_function :sleep, :sqlite3_sleep, [:int], :int
-
# CAPI3REF: Test For Auto-Commit Mode
# KEYWORDS: {autocommit mode}
- #
+
# ^The sqlite3_get_autocommit() interface returns non-zero or
# zero if the given database connection is or is not in autocommit mode,
# respectively. ^Autocommit mode is on by default.
# ^Autocommit mode is disabled by a (BEGIN) statement.
# ^Autocommit mode is re-enabled by a (COMMIT) or (ROLLBACK).
- #
+
# If certain kinds of errors occur on a statement within a multi-statement
# transaction (errors including (SQLITE_FULL), (SQLITE_IOERR),
# (SQLITE_NOMEM), (SQLITE_BUSY), and (SQLITE_INTERRUPT)) then the
# transaction might be rolled back automatically. The only way to
# find out whether SQLite automatically rolled back the transaction after
# an error is to use this function.
- #
+
# If another thread changes the autocommit status of the database
# connection while this routine is running, then the return value
# is undefined.
- #
+
# @method get_autocommit(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @return [Integer]
# @scope class
attach_function :get_autocommit, :sqlite3_get_autocommit, [Sqlite3], :int
-
# CAPI3REF: Find The Database Handle Of A Prepared Statement
- #
+
# ^The sqlite3_db_handle interface returns the (database connection) handle
# to which a (prepared statement) belongs. ^The (database connection)
# returned by sqlite3_db_handle is the same (database connection)
# that was the first argument
# to the (sqlite3_prepare_v2()) call (or its variants) that was used to
# create the statement in the first place.
- #
+
# @method db_handle(stmt)
- # @param [Stmt] stmt
- # @return [Sqlite3]
+ # @param [Stmt] stmt
+ # @return [Sqlite3]
# @scope class
attach_function :db_handle, :sqlite3_db_handle, [Stmt], Sqlite3
-
# CAPI3REF: Find the next prepared statement
- #
+
# ^This interface returns a pointer to the next (prepared statement) after
# pStmt associated with the (database connection) pDb. ^If pStmt is NULL
# then this interface returns a pointer to the first prepared statement
# associated with the database connection pDb. ^If no prepared statement
# satisfies the conditions of this routine, it returns NULL.
- #
+
# The (database connection) pointer D in a call to
# (sqlite3_next_stmt(D,S)) must refer to an open database
# connection and in particular must not be a NULL pointer.
- #
+
# @method next_stmt(p_db, p_stmt)
- # @param [Sqlite3] p_db
- # @param [Stmt] p_stmt
- # @return [Stmt]
+ # @param [Sqlite3] p_db
+ # @param [Stmt] p_stmt
+ # @return [Stmt]
# @scope class
attach_function :next_stmt, :sqlite3_next_stmt, [Sqlite3, Stmt], Stmt
-
# CAPI3REF: Commit And Rollback Notification Callbacks
- #
+
# ^The sqlite3_commit_hook() interface registers a callback
# function to be invoked whenever a transaction is (COMMIT | committed).
# ^Any callback set by a previous call to sqlite3_commit_hook()
@@ -4671,12 +4533,12 @@ class Context < FFI::Struct
# ^The pArg argument is passed through to the callback.
# ^If the callback on a commit hook function returns non-zero,
# then the commit is converted into a rollback.
- #
+
# ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions
# return the P argument from the previous call of the same function
# on the same (database connection) D, or NULL for
# the first call for each function on D.
- #
+
# The callback implementation must not do anything that will modify
# the database connection that invoked the callback. Any actions
# to modify the database connection must be deferred until after the
@@ -4684,49 +4546,47 @@ class Context < FFI::Struct
# or rollback hook in the first place.
# Note that (sqlite3_prepare_v2()) and (sqlite3_step()) both modify their
# database connections for the meaning of "modify" in this paragraph.
- #
+
# ^Registering a NULL function disables the callback.
- #
+
# ^When the commit hook callback routine returns zero, the (COMMIT)
# operation is allowed to continue normally. ^If the commit hook
# returns non-zero, then the (COMMIT) is converted into a (ROLLBACK).
# ^The rollback hook is invoked on a rollback that results from a commit
# hook returning non-zero, just as it would be with any other rollback.
- #
+
# ^For the purposes of this API, a transaction is said to have been
# rolled back if an explicit "ROLLBACK" statement is executed, or
# an error or constraint causes an implicit rollback to occur.
# ^The rollback callback is not invoked if a transaction is
# automatically rolled back because the database connection is closed.
- #
+
# See also the (sqlite3_update_hook()) interface.
- #
- # @method commit_hook(sqlite3, , void)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*)]
- # @param [FFI::Pointer(*Void)] void
- # @return [FFI::Pointer(*Void)]
+
+ # @method commit_hook(sqlite3, functionproto, void)
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @param [FFI::Pointer(*Void)] void
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :commit_hook, :sqlite3_commit_hook, [Sqlite3, :pointer, :pointer], :pointer
-
# (Not documented)
- #
- # @method rollback_hook(sqlite3, , void)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*)]
- # @param [FFI::Pointer(*Void)] void
- # @return [FFI::Pointer(*Void)]
+
+ # @method rollback_hook(sqlite3, functionproto, void)
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @param [FFI::Pointer(*Void)] void
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :rollback_hook, :sqlite3_rollback_hook, [Sqlite3, :pointer, :pointer], :pointer
-
# CAPI3REF: Data Change Notification Callbacks
- #
+
# ^The sqlite3_update_hook() interface registers a callback function
# with the (database connection) identified by the first argument
# to be invoked whenever a row is updated, inserted or deleted.
# ^Any callback set by a previous call to this function
# for the same database connection is overridden.
- #
+
# ^The second argument is a pointer to the function to invoke when a
# row is updated, inserted or deleted.
# ^The first argument to the callback is a copy of the third argument
@@ -4738,74 +4598,72 @@ class Context < FFI::Struct
# database and table name containing the affected row.
# ^The final callback parameter is the (rowid) of the row.
# ^In the case of an update, this is the (rowid) after the update takes place.
- #
+
# ^(The update hook is not invoked when internal system tables are
# modified (i.e. sqlite_master and sqlite_sequence).)^
- #
+
# ^In the current implementation, the update hook
# is not invoked when duplication rows are deleted because of an
# (ON CONFLICT | ON CONFLICT REPLACE) clause. ^Nor is the update hook
# invoked when rows are deleted using the (truncate optimization).
# The exceptions defined in this paragraph might change in a future
# release of SQLite.
- #
+
# The update hook implementation must not do anything that will modify
# the database connection that invoked the update hook. Any actions
# to modify the database connection must be deferred until after the
# completion of the (sqlite3_step()) call that triggered the update hook.
# Note that (sqlite3_prepare_v2()) and (sqlite3_step()) both modify their
# database connections for the meaning of "modify" in this paragraph.
- #
+
# ^The sqlite3_update_hook(D,C,P) function
# returns the P argument from the previous call
# on the same (database connection) D, or NULL for
# the first call on D.
- #
+
# See also the (sqlite3_commit_hook()) and (sqlite3_rollback_hook())
# interfaces.
- #
- # @method update_hook(sqlite3, , void)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*)]
- # @param [FFI::Pointer(*Void)] void
- # @return [FFI::Pointer(*Void)]
+
+ # @method update_hook(sqlite3, functionproto, void)
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @param [FFI::Pointer(*Void)] void
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :update_hook, :sqlite3_update_hook, [Sqlite3, :pointer, :pointer], :pointer
-
# CAPI3REF: Enable Or Disable Shared Pager Cache
# KEYWORDS: {shared cache}
- #
+
# ^(This routine enables or disables the sharing of the database cache
# and schema data structures between (database connection | connections)
# to the same database. Sharing is enabled if the argument is true
# and disabled if the argument is false.)^
- #
+
# ^Cache sharing is enabled and disabled for an entire process.
# This is a change as of SQLite version 3.5.0. In prior versions of SQLite,
# sharing was enabled or disabled for each thread separately.
- #
+
# ^(The cache sharing mode set by this interface effects all subsequent
# calls to (sqlite3_open()), (sqlite3_open_v2()), and (sqlite3_open16()).
# Existing database connections continue use the sharing mode
# that was in effect at the time they were opened.)^
- #
+
# ^(This routine returns (SQLITE_OK) if shared cache was enabled or disabled
# successfully. An (error code) is returned otherwise.)^
- #
+
# ^Shared cache is disabled by default. But this might change in
# future releases of SQLite. Applications that care about shared
# cache setting should set it explicitly.
- #
+
# See Also: (SQLite Shared-Cache Mode)
- #
+
# @method enable_shared_cache(int)
- # @param [Integer] int
- # @return [Integer]
+ # @param [Integer] int
+ # @return [Integer]
# @scope class
attach_function :enable_shared_cache, :sqlite3_enable_shared_cache, [:int], :int
-
# CAPI3REF: Attempt To Free Heap Memory
- #
+
# ^The sqlite3_release_memory() interface attempts to free N bytes
# of heap memory by deallocating non-essential memory allocations
# held by the database library. Memory used to cache database
@@ -4814,15 +4672,14 @@ class Context < FFI::Struct
# which might be more or less than the amount requested.
# ^The sqlite3_release_memory() routine is a no-op returning zero
# if SQLite is not compiled with (SQLITE_ENABLE_MEMORY_MANAGEMENT).
- #
+
# @method release_memory(int)
- # @param [Integer] int
- # @return [Integer]
+ # @param [Integer] int
+ # @return [Integer]
# @scope class
attach_function :release_memory, :sqlite3_release_memory, [:int], :int
-
# CAPI3REF: Impose A Limit On Heap Size
- #
+
# ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
# soft limit on the amount of heap memory that may be allocated by SQLite.
# ^SQLite strives to keep heap memory utilization below the soft heap
@@ -4832,18 +4689,18 @@ class Context < FFI::Struct
# below the limit, it will exceed the limit rather than generate
# an (SQLITE_NOMEM) error. In other words, the soft heap limit
# is advisory only.
- #
+
# ^The return value from sqlite3_soft_heap_limit64() is the size of
# the soft heap limit prior to the call. ^If the argument N is negative
# then no change is made to the soft heap limit. Hence, the current
# size of the soft heap limit can be determined by invoking
# sqlite3_soft_heap_limit64() with a negative argument.
- #
+
# ^If the argument N is zero then the soft heap limit is disabled.
- #
+
# ^(The soft heap limit is not enforced in the current implementation
# if one or more of following conditions are true:
- #
+
#
# - The soft heap limit is set to zero.
#
- Memory accounting is disabled using a combination of the
@@ -4855,7 +4712,7 @@ class Context < FFI::Struct
# by (sqlite3_config)((SQLITE_CONFIG_PAGECACHE),...) rather than
# from the heap.
#
)^
- #
+
# Beginning with SQLite version 3.7.3, the soft heap limit is enforced
# regardless of whether or not the (SQLITE_ENABLE_MEMORY_MANAGEMENT)
# compile-time option is invoked. With (SQLITE_ENABLE_MEMORY_MANAGEMENT),
@@ -4865,55 +4722,53 @@ class Context < FFI::Struct
# the page cache is the predominate memory user in SQLite, most
# applications will achieve adequate soft heap limit enforcement without
# the use of (SQLITE_ENABLE_MEMORY_MANAGEMENT).
- #
+
# The circumstances under which SQLite will enforce the soft heap limit may
# changes in future releases of SQLite.
- #
+
# @method soft_heap_limit64(n)
- # @param [Integer] n
- # @return [Integer]
+ # @param [Integer] n
+ # @return [Integer]
# @scope class
attach_function :soft_heap_limit64, :sqlite3_soft_heap_limit64, [:long_long], :long_long
-
# CAPI3REF: Deprecated Soft Heap Limit Interface
# DEPRECATED
- #
+
# This is a deprecated version of the (sqlite3_soft_heap_limit64())
# interface. This routine is provided for historical compatibility
# only. All new applications should use the
# (sqlite3_soft_heap_limit64()) interface rather than this one.
- #
+
# @method soft_heap_limit(n)
- # @param [Integer] n
- # @return [nil]
+ # @param [Integer] n
+ # @return [nil]
# @scope class
attach_function :soft_heap_limit, :sqlite3_soft_heap_limit, [:int], :void
-
# CAPI3REF: Extract Metadata About A Column Of A Table
- #
+
# ^This routine returns metadata about a specific column of a specific
# database table accessible using the (database connection) handle
# passed as the first function argument.
- #
+
# ^The column is identified by the second, third and fourth parameters to
# this function. ^The second parameter is either the name of the database
# (i.e. "main", "temp", or an attached database) containing the specified
# table or NULL. ^If it is NULL, then all attached databases are searched
# for the table using the same algorithm used by the database engine to
# resolve unqualified table references.
- #
+
# ^The third and fourth parameters to this function are the table and column
# name of the desired column, respectively. Neither of these parameters
# may be NULL.
- #
+
# ^Metadata is returned by writing to the memory locations passed as the 5th
# and subsequent parameters to this function. ^Any of these arguments may be
# NULL, in which case the corresponding element of metadata is omitted.
- #
+
# ^(
#
# | Parameter | Output Type | Description
- #
+
# |
|---|
| 5th | const char* | Data type
# |
| 6th | const char* | Name of default collation sequence
# |
| 7th | int | True if column has a NOT NULL constraint
@@ -4921,19 +4776,19 @@ class Context < FFI::Struct
# |
| 9th | int | True if column is (AUTOINCREMENT)
# |
#
)^
- #
+
# ^The memory pointed to by the character pointers returned for the
# declaration type and collation sequence is valid only until the next
# call to any SQLite API function.
- #
+
# ^If the specified table is actually a view, an (error code) is returned.
- #
+
# ^If the specified column is "rowid", "oid" or "_rowid_" and an
# (INTEGER PRIMARY KEY) column has been explicitly declared, then the output
# parameters are set for the explicitly declared column. ^(If there is no
# explicitly declared (INTEGER PRIMARY KEY) column, then the output
# parameters are set as follows:
- #
+
#
# data type: "INTEGER"
# collation sequence: "BINARY"
@@ -4941,36 +4796,35 @@ class Context < FFI::Struct
# primary key: 1
# auto increment: 0
#
)^
- #
+
# ^(This function may load one or more schemas from database files. If an
# error occurs during this process, or if the requested table or column
# cannot be found, an (error code) is returned and an error message left
# in the (database connection) (to be retrieved using sqlite3_errmsg()).)^
- #
+
# ^This API is only available if the library was compiled with the
# (SQLITE_ENABLE_COLUMN_METADATA) C-preprocessor symbol defined.
- #
+
# @method table_column_metadata(db, z_db_name, z_table_name, z_column_name, pz_data_type, pz_coll_seq, p_not_null, p_primary_key, p_autoinc)
- # @param [Sqlite3] db
- # @param [String] z_db_name
- # @param [String] z_table_name
- # @param [String] z_column_name
- # @param [FFI::Pointer(**CharS)] pz_data_type
- # @param [FFI::Pointer(**CharS)] pz_coll_seq
- # @param [FFI::Pointer(*Int)] p_not_null
- # @param [FFI::Pointer(*Int)] p_primary_key
- # @param [FFI::Pointer(*Int)] p_autoinc
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_db_name
+ # @param [String] z_table_name
+ # @param [String] z_column_name
+ # @param [FFI::Pointer(**CharS)] pz_data_type
+ # @param [FFI::Pointer(**CharS)] pz_coll_seq
+ # @param [FFI::Pointer(*Int)] p_not_null
+ # @param [FFI::Pointer(*Int)] p_primary_key
+ # @param [FFI::Pointer(*Int)] p_autoinc
+ # @return [Integer]
# @scope class
attach_function :table_column_metadata, :sqlite3_table_column_metadata, [Sqlite3, :string, :string, :string, :pointer, :pointer, :pointer, :pointer, :pointer], :int
-
# CAPI3REF: Load An Extension
- #
+
# ^This interface loads an SQLite extension library from the named file.
- #
+
# ^The sqlite3_load_extension() interface attempts to load an
# SQLite extension library contained in the file zFile.
- #
+
# ^The entry point is zProc.
# ^zProc may be 0, in which case the name of the entry point
# defaults to "sqlite3_extension_init".
@@ -4981,53 +4835,51 @@ class Context < FFI::Struct
# fill *pzErrMsg with error message text stored in memory
# obtained from (sqlite3_malloc()). The calling function
# should free this memory by calling (sqlite3_free()).
- #
+
# ^Extension loading must be enabled using
# (sqlite3_enable_load_extension()) prior to calling this API,
# otherwise an error will be returned.
- #
+
# See also the (load_extension() SQL function).
- #
+
# @method load_extension(db, z_file, z_proc, pz_err_msg)
- # @param [Sqlite3] db
- # @param [String] z_file
- # @param [String] z_proc
- # @param [FFI::Pointer(**CharS)] pz_err_msg
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_file
+ # @param [String] z_proc
+ # @param [FFI::Pointer(**CharS)] pz_err_msg
+ # @return [Integer]
# @scope class
attach_function :load_extension, :sqlite3_load_extension, [Sqlite3, :string, :string, :pointer], :int
-
# CAPI3REF: Enable Or Disable Extension Loading
- #
+
# ^So as not to open security holes in older applications that are
# unprepared to deal with extension loading, and as a means of disabling
# extension loading while evaluating user-entered SQL, the following API
# is provided to turn the (sqlite3_load_extension()) mechanism on and off.
- #
+
# ^Extension loading is off by default. See ticket #1863.
# ^Call the sqlite3_enable_load_extension() routine with onoff==1
# to turn extension loading on and call it with onoff==0 to turn
# it back off again.
- #
+
# @method enable_load_extension(db, onoff)
- # @param [Sqlite3] db
- # @param [Integer] onoff
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [Integer] onoff
+ # @return [Integer]
# @scope class
attach_function :enable_load_extension, :sqlite3_enable_load_extension, [Sqlite3, :int], :int
-
# CAPI3REF: Automatically Load Statically Linked Extensions
- #
+
# ^This interface causes the xEntryPoint() function to be invoked for
# each new (database connection) that is created. The idea here is that
# xEntryPoint() is the entry point for a statically linked SQLite extension
# that is to be automatically loaded into all new database connections.
- #
+
# ^(Even though the function prototype shows that xEntryPoint() takes
# no arguments and returns void, SQLite invokes xEntryPoint() with three
# arguments and expects and integer result as if the signature of the
# entry point where as follows:
- #
+
#
# int xEntryPoint(
# sqlite3 *db,
@@ -5035,7 +4887,7 @@ class Context < FFI::Struct
# const struct sqlite3_api_routines *pThunk
# );
#
)^
- #
+
# If the xEntryPoint routine encounters an error, it should make *pzErrMsg
# point to an appropriate error message (obtained from (sqlite3_mprintf()))
# and return an appropriate (error code). ^SQLite ensures that *pzErrMsg
@@ -5043,36 +4895,34 @@ class Context < FFI::Struct
# (sqlite3_free()) on *pzErrMsg after xEntryPoint() returns. ^If any
# xEntryPoint() returns an error, the (sqlite3_open()), (sqlite3_open16()),
# or (sqlite3_open_v2()) call that provoked the xEntryPoint() will fail.
- #
+
# ^Calling sqlite3_auto_extension(X) with an entry point X that is already
# on the list of automatic extensions is a harmless no-op. ^No entry point
# will be called more than once for each database connection that is opened.
- #
+
# See also: (sqlite3_reset_auto_extension()).
- #
+
# @method auto_extension(x_entry_point)
- # @param [FFI::Pointer(*)] x_entry_point
- # @return [Integer]
+ # @param [FFI::Pointer(*FunctionProto)] x_entry_point
+ # @return [Integer]
# @scope class
attach_function :auto_extension, :sqlite3_auto_extension, [:pointer], :int
-
# CAPI3REF: Reset Automatic Extension Loading
- #
+
# ^This interface disables all automatic extensions previously
# registered using (sqlite3_auto_extension()).
- #
+
# @method reset_auto_extension()
- # @return [nil]
+ # @return [nil]
# @scope class
attach_function :reset_auto_extension, :sqlite3_reset_auto_extension, [], :void
-
# CAPI3REF: Virtual Table Object
# KEYWORDS: sqlite3_module {virtual table module}
- #
+
# This structure, sometimes called a "virtual table module",
# defines the implementation of a (virtual tables).
# This structure consists mostly of methods for the module.
- #
+
# ^A virtual table module is created by filling in a persistent
# instance of this structure and passing a pointer to that instance
# to (sqlite3_create_module()) or (sqlite3_create_module_v2()).
@@ -5080,55 +4930,55 @@ class Context < FFI::Struct
# module or until the (database connection) closes. The content
# of this structure must not change while it is registered with
# any database connection.
- #
+
# = Fields:
# :i_version ::
- # (Integer)
+ # (Integer)
# :x_create ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_connect ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_best_index ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_disconnect ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_destroy ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_open ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_close ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_filter ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_next ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_eof ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_column ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_rowid ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_update ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_begin ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_sync ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_commit ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_rollback ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_find_function ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_rename ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_savepoint ::
- # (FFI::Pointer(*)) The methods above are in version 1 of the sqlite_module object. Those
+ # (FFI::Pointer(*FunctionProto)) The methods above are in version 1 of the sqlite_module object. Those
# below are for version 2 and greater.
# :x_release ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_rollback_to ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
class Module < FFI::Struct
layout :i_version, :int,
:x_create, :pointer,
@@ -5154,9 +5004,9 @@ class Module < FFI::Struct
:x_release, :pointer,
:x_rollback_to, :pointer
end
-
+
# (Not documented)
- #
+
# = Fields:
# :i_column ::
# (Integer) Column on left-hand side of constraint
@@ -5172,9 +5022,9 @@ class IndexConstraint < FFI::Struct
:usable, :uchar,
:i_term_offset, :int
end
-
+
# (Not documented)
- #
+
# = Fields:
# :i_column ::
# (Integer) Column number
@@ -5184,9 +5034,9 @@ class IndexOrderby < FFI::Struct
layout :i_column, :int,
:desc, :uchar
end
-
+
# (Not documented)
- #
+
# = Fields:
# :argv_index ::
# (Integer) if >0, constraint is part of argv to xFilter
@@ -5196,21 +5046,21 @@ class IndexConstraintUsage < FFI::Struct
layout :argv_index, :int,
:omit, :uchar
end
-
+
# CAPI3REF: Virtual Table Indexing Information
# KEYWORDS: sqlite3_index_info
- #
+
# The sqlite3_index_info structure and its substructures is used as part
# of the (virtual table) interface to
# pass information into and receive the reply from the (xBestIndex)
# method of a (virtual table module). The fields under **Inputs** are the
# inputs to xBestIndex and are read-only. xBestIndex inserts its
# results into the **Outputs** fields.
- #
+
# ^(The aConstraint() array records WHERE clause constraints of the form:
- #
+
# column OP expr
- #
+
# where OP is =, <, <=, >, or >=.)^ ^(The particular operator is
# stored in aConstraint().op using one of the
# (SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values).)^
@@ -5218,37 +5068,37 @@ class IndexConstraintUsage < FFI::Struct
# aConstraint().iColumn.)^ ^(aConstraint().usable is TRUE if the
# expr on the right-hand side can be evaluated (and thus the constraint
# is usable) and false if it cannot.)^
- #
+
# ^The optimizer automatically inverts terms of the form "expr OP column"
# and makes other simplifications to the WHERE clause in an attempt to
# get as many WHERE clause terms into the form shown above as possible.
# ^The aConstraint() array only reports WHERE clause terms that are
# relevant to the particular virtual table being queried.
- #
+
# ^Information about the ORDER BY clause is stored in aOrderBy().
# ^Each term of aOrderBy records a column of the ORDER BY clause.
- #
+
# The (xBestIndex) method must fill aConstraintUsage() with information
# about what parameters to pass to xFilter. ^If argvIndex>0 then
# the right-hand side of the corresponding aConstraint() is evaluated
# and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage().omit
# is true, then the constraint is assumed to be fully handled by the
# virtual table and is not checked again by SQLite.)^
- #
+
# ^The idxNum and idxPtr values are recorded and passed into the
# (xFilter) method.
# ^(sqlite3_free()) is used to free idxPtr if and only if
# needToFreeIdxPtr is true.
- #
+
# ^The orderByConsumed means that output from (xFilter)/(xNext) will occur in
# the correct order to satisfy the ORDER BY clause so that no separate
# sorting step is required.
- #
+
# ^The estimatedCost value is an estimate of the cost of doing the
# particular lookup. A full scan of a table with N entries should have
# a cost of N. A binary search of a table of N entries should have a
# cost of approximately log(N).
- #
+
# = Fields:
# :n_constraint ::
# (Integer) Number of entries in aConstraint
@@ -5282,14 +5132,14 @@ class IndexInfo < FFI::Struct
:order_by_consumed, :int,
:estimated_cost, :double
end
-
+
# CAPI3REF: Register A Virtual Table Implementation
- #
+
# ^These routines are used to register a new (virtual table module) name.
# ^Module names must be registered before
# creating a new (virtual table) using the module and before using a
# preexisting (virtual table) for the module.
- #
+
# ^The module name is registered on the (database connection) specified
# by the first parameter. ^The name of the module is given by the
# second parameter. ^The third parameter is a pointer to
@@ -5297,7 +5147,7 @@ class IndexInfo < FFI::Struct
# parameter is an arbitrary client data pointer that is passed through
# into the (xCreate) and (xConnect) methods of the virtual table module
# when a new virtual table is be being created or reinitialized.
- #
+
# ^The sqlite3_create_module_v2() interface has a fifth parameter which
# is a pointer to a destructor for the pClientData. ^SQLite will
# invoke the destructor function (if it is not NULL) when SQLite
@@ -5306,48 +5156,46 @@ class IndexInfo < FFI::Struct
# ^The sqlite3_create_module()
# interface is equivalent to sqlite3_create_module_v2() with a NULL
# destructor.
- #
+
# @method create_module(db, z_name, p, p_client_data)
- # @param [Sqlite3] db
- # @param [String] z_name
- # @param [Module] p
- # @param [FFI::Pointer(*Void)] p_client_data
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_name
+ # @param [Module] p
+ # @param [FFI::Pointer(*Void)] p_client_data
+ # @return [Integer]
# @scope class
attach_function :create_module, :sqlite3_create_module, [Sqlite3, :string, Module, :pointer], :int
-
# (Not documented)
- #
+
# @method create_module_v2(db, z_name, p, p_client_data, x_destroy)
- # @param [Sqlite3] db
- # @param [String] z_name
- # @param [Module] p
- # @param [FFI::Pointer(*Void)] p_client_data
- # @param [FFI::Pointer(*)] x_destroy
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_name
+ # @param [Module] p
+ # @param [FFI::Pointer(*Void)] p_client_data
+ # @param [FFI::Pointer(*FunctionProto)] x_destroy
+ # @return [Integer]
# @scope class
attach_function :create_module_v2, :sqlite3_create_module_v2, [Sqlite3, :string, Module, :pointer, :pointer], :int
-
# Structures used by the virtual table interface
- #
- #
+
+
# CAPI3REF: Virtual Table Instance Object
# KEYWORDS: sqlite3_vtab
- #
+
# Every (virtual table module) implementation uses a subclass
# of this object to describe a particular instance
# of the (virtual table). Each subclass will
# be tailored to the specific needs of the module implementation.
# The purpose of this superclass is to define certain fields that are
# common to all module implementations.
- #
+
# ^Virtual tables methods can set an error message by assigning a
# string obtained from (sqlite3_mprintf()) to zErrMsg. The method should
# take care that any prior string is freed by a call to (sqlite3_free())
# prior to assigning a new string to zErrMsg. ^After the error message
# is delivered up to the client application, the string will be automatically
# freed by sqlite3_free() and the zErrMsg field will be zeroed.
- #
+
# = Fields:
# :p_module ::
# (Module) The module for this virtual table
@@ -5360,10 +5208,10 @@ class Vtab < FFI::Struct
:n_ref, :int,
:z_err_msg, :string
end
-
+
# CAPI3REF: Virtual Table Cursor Object
# KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}
- #
+
# Every (virtual table module) implementation uses a subclass of the
# following structure to describe cursors that point into the
# (virtual table) and are used
@@ -5373,38 +5221,37 @@ class Vtab < FFI::Struct
# by the (xFilter), (xNext), (xEof), (xColumn), and (xRowid) methods
# of the module. Each module implementation will define
# the content of a cursor structure to suit its own needs.
- #
+
# This superclass exists in order to define fields of the cursor that
# are common to all implementations.
- #
+
# = Fields:
# :p_vtab ::
# (Vtab) Virtual table of this cursor
class VtabCursor < FFI::Struct
layout :p_vtab, Vtab
end
-
+
# CAPI3REF: Declare The Schema Of A Virtual Table
- #
+
# ^The (xCreate) and (xConnect) methods of a
# (virtual table module) call this interface
# to declare the format (the names and datatypes of the columns) of
# the virtual tables they implement.
- #
+
# @method declare_vtab(sqlite3, z_sql)
- # @param [Sqlite3] sqlite3
- # @param [String] z_sql
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [String] z_sql
+ # @return [Integer]
# @scope class
attach_function :declare_vtab, :sqlite3_declare_vtab, [Sqlite3, :string], :int
-
# CAPI3REF: Overload A Function For A Virtual Table
- #
+
# ^(Virtual tables can provide alternative implementations of functions
# using the (xFindFunction) method of the (virtual table module).
# But global versions of those functions
# must exist in order to be overloaded.)^
- #
+
# ^(This API makes sure a global version of a function with a particular
# name and number of parameters exists. If no such function exists
# before this API is called, a new function is created.)^ ^The implementation
@@ -5412,18 +5259,17 @@ class VtabCursor < FFI::Struct
# the new function is not good for anything by itself. Its only
# purpose is to be a placeholder function that can be overloaded
# by a (virtual table).
- #
+
# @method overload_function(sqlite3, z_func_name, n_arg)
- # @param [Sqlite3] sqlite3
- # @param [String] z_func_name
- # @param [Integer] n_arg
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [String] z_func_name
+ # @param [Integer] n_arg
+ # @return [Integer]
# @scope class
attach_function :overload_function, :sqlite3_overload_function, [Sqlite3, :string, :int], :int
-
# CAPI3REF: A Handle To An Open BLOB
# KEYWORDS: {BLOB handle} {BLOB handles}
- #
+
# An instance of this object represents an open BLOB on which
# (sqlite3_blob_open | incremental BLOB I/O) can be performed.
# ^Objects of this type are created by (sqlite3_blob_open())
@@ -5432,66 +5278,66 @@ class VtabCursor < FFI::Struct
# can be used to read or write small subsections of the BLOB.
# ^The (sqlite3_blob_bytes()) interface returns the size of the BLOB in bytes.
module BlobWrappers
- # @param [Integer] long_long
- # @return [Integer]
+ # @param [Integer] long_long
+ # @return [Integer]
def reopen(long_long)
SQLite3.blob_reopen(self, long_long)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def close()
SQLite3.blob_close(self)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def bytes()
SQLite3.blob_bytes(self)
end
-
- # @param [FFI::Pointer(*Void)] z
- # @param [Integer] n
- # @param [Integer] i_offset
- # @return [Integer]
+
+ # @param [FFI::Pointer(*Void)] z
+ # @param [Integer] n
+ # @param [Integer] i_offset
+ # @return [Integer]
def read(z, n, i_offset)
SQLite3.blob_read(self, z, n, i_offset)
end
-
- # @param [FFI::Pointer(*Void)] z
- # @param [Integer] n
- # @param [Integer] i_offset
- # @return [Integer]
+
+ # @param [FFI::Pointer(*Void)] z
+ # @param [Integer] n
+ # @param [Integer] i_offset
+ # @return [Integer]
def write(z, n, i_offset)
SQLite3.blob_write(self, z, n, i_offset)
end
end
-
+
class Blob < FFI::Struct
include BlobWrappers
layout :dummy, :char
end
-
+
# CAPI3REF: Open A BLOB For Incremental I/O
- #
+
# ^(This interfaces opens a (BLOB handle | handle) to the BLOB located
# in row iRow, column zColumn, table zTable in database zDb;
# in other words, the same BLOB that would be selected by:
- #
+
#
# SELECT zColumn FROM zDb.zTable WHERE (rowid) = iRow;
#
)^
- #
+
# ^If the flags parameter is non-zero, then the BLOB is opened for read
# and write access. ^If it is zero, the BLOB is opened for read access.
# ^It is not possible to open a column that is part of an index or primary
# key for writing. ^If (foreign key constraints) are enabled, it is
# not possible to open a column that is part of a (child key) for writing.
- #
+
# ^Note that the database name is not the filename that contains
# the database but rather the symbolic name of the database that
# appears after the AS keyword when the database is connected using (ATTACH).
# ^For the main database file, the database name is "main".
# ^For TEMP tables, the database name is "temp".
- #
+
# ^(On success, (SQLITE_OK) is returned and the new (BLOB handle) is written
# to *ppBlob. Otherwise an (error code) is returned and *ppBlob is set
# to be a null pointer.)^
@@ -5500,7 +5346,7 @@ class Blob < FFI::Struct
# functions. ^Note that the *ppBlob variable is always initialized in a
# way that makes it safe to invoke (sqlite3_blob_close()) on *ppBlob
# regardless of the success or failure of this routine.
- #
+
# ^(If the row that a BLOB handle points to is modified by an
# (UPDATE), (DELETE), or by (ON CONFLICT) side-effects
# then the BLOB handle is marked as "expired".
@@ -5511,41 +5357,40 @@ class Blob < FFI::Struct
# ^(Changes written into a BLOB prior to the BLOB expiring are not
# rolled back by the expiration of the BLOB. Such changes will eventually
# commit if the transaction continues to completion.)^
- #
+
# ^Use the (sqlite3_blob_bytes()) interface to determine the size of
# the opened blob. ^The size of a blob may not be changed by this
# interface. Use the (UPDATE) SQL command to change the size of a
# blob.
- #
+
# ^The (sqlite3_bind_zeroblob()) and (sqlite3_result_zeroblob()) interfaces
# and the built-in (zeroblob) SQL function can be used, if desired,
# to create an empty, zero-filled blob in which to read or write using
# this interface.
- #
+
# To avoid a resource leak, every open (BLOB handle) should eventually
# be released by a call to (sqlite3_blob_close()).
- #
+
# @method blob_open(sqlite3, z_db, z_table, z_column, i_row, flags, pp_blob)
- # @param [Sqlite3] sqlite3
- # @param [String] z_db
- # @param [String] z_table
- # @param [String] z_column
- # @param [Integer] i_row
- # @param [Integer] flags
- # @param [FFI::Pointer(**Blob)] pp_blob
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [String] z_db
+ # @param [String] z_table
+ # @param [String] z_column
+ # @param [Integer] i_row
+ # @param [Integer] flags
+ # @param [FFI::Pointer(**Blob)] pp_blob
+ # @return [Integer]
# @scope class
attach_function :blob_open, :sqlite3_blob_open, [Sqlite3, :string, :string, :string, :long_long, :int, :pointer], :int
-
# CAPI3REF: Move a BLOB Handle to a New Row
- #
+
# ^This function is used to move an existing blob handle so that it points
# to a different row of the same database table. ^The new row is identified
# by the rowid value passed as the second argument. Only the row can be
# changed. ^The database, table and column on which the blob handle is open
# remain the same. Moving an existing blob handle to a new row can be
# faster than closing the existing handle and opening a new one.
- #
+
# ^(The new row must meet the same criteria as for (sqlite3_blob_open()) -
# it must exist and there must be either a blob or text value stored in
# the nominated column.)^ ^If the new row is not present in the table, or if
@@ -5555,105 +5400,101 @@ class Blob < FFI::Struct
# (sqlite3_blob_reopen()) on an aborted blob handle immediately return
# SQLITE_ABORT. ^Calling (sqlite3_blob_bytes()) on an aborted blob handle
# always returns zero.
- #
+
# ^This function sets the database handle error code and message.
- #
+
# @method blob_reopen(blob, long_long)
- # @param [Blob] blob
- # @param [Integer] long_long
- # @return [Integer]
+ # @param [Blob] blob
+ # @param [Integer] long_long
+ # @return [Integer]
# @scope class
attach_function :blob_reopen, :sqlite3_blob_reopen, [Blob, :long_long], :int
-
# CAPI3REF: Close A BLOB Handle
- #
+
# ^Closes an open (BLOB handle).
- #
+
# ^Closing a BLOB shall cause the current transaction to commit
# if there are no other BLOBs, no pending prepared statements, and the
# database connection is in (autocommit mode).
# ^If any writes were made to the BLOB, they might be held in cache
# until the close operation if they will fit.
- #
+
# ^(Closing the BLOB often forces the changes
# out to disk and so if any I/O errors occur, they will likely occur
# at the time when the BLOB is closed. Any errors that occur during
# closing are reported as a non-zero return value.)^
- #
+
# ^(The BLOB is closed unconditionally. Even if this routine returns
# an error code, the BLOB is still closed.)^
- #
+
# ^Calling this routine with a null pointer (such as would be returned
# by a failed call to (sqlite3_blob_open())) is a harmless no-op.
- #
+
# @method blob_close(blob)
- # @param [Blob] blob
- # @return [Integer]
+ # @param [Blob] blob
+ # @return [Integer]
# @scope class
attach_function :blob_close, :sqlite3_blob_close, [Blob], :int
-
# CAPI3REF: Return The Size Of An Open BLOB
- #
+
# ^Returns the size in bytes of the BLOB accessible via the
# successfully opened (BLOB handle) in its only argument. ^The
# incremental blob I/O routines can only read or overwriting existing
# blob content; they cannot change the size of a blob.
- #
+
# This routine only works on a (BLOB handle) which has been created
# by a prior successful call to (sqlite3_blob_open()) and which has not
# been closed by (sqlite3_blob_close()). Passing any other pointer in
# to this routine results in undefined and probably undesirable behavior.
- #
+
# @method blob_bytes(blob)
- # @param [Blob] blob
- # @return [Integer]
+ # @param [Blob] blob
+ # @return [Integer]
# @scope class
attach_function :blob_bytes, :sqlite3_blob_bytes, [Blob], :int
-
# CAPI3REF: Read Data From A BLOB Incrementally
- #
+
# ^(This function is used to read data from an open (BLOB handle) into a
# caller-supplied buffer. N bytes of data are copied into buffer Z
# from the open BLOB, starting at offset iOffset.)^
- #
+
# ^If offset iOffset is less than N bytes from the end of the BLOB,
# (SQLITE_ERROR) is returned and no data is read. ^If N or iOffset is
# less than zero, (SQLITE_ERROR) is returned and no data is read.
# ^The size of the blob (and hence the maximum value of N+iOffset)
# can be determined using the (sqlite3_blob_bytes()) interface.
- #
+
# ^An attempt to read from an expired (BLOB handle) fails with an
# error code of (SQLITE_ABORT).
- #
+
# ^(On success, sqlite3_blob_read() returns SQLITE_OK.
# Otherwise, an (error code) or an (extended error code) is returned.)^
- #
+
# This routine only works on a (BLOB handle) which has been created
# by a prior successful call to (sqlite3_blob_open()) and which has not
# been closed by (sqlite3_blob_close()). Passing any other pointer in
# to this routine results in undefined and probably undesirable behavior.
- #
+
# See also: (sqlite3_blob_write()).
- #
+
# @method blob_read(blob, z, n, i_offset)
- # @param [Blob] blob
- # @param [FFI::Pointer(*Void)] z
- # @param [Integer] n
- # @param [Integer] i_offset
- # @return [Integer]
+ # @param [Blob] blob
+ # @param [FFI::Pointer(*Void)] z
+ # @param [Integer] n
+ # @param [Integer] i_offset
+ # @return [Integer]
# @scope class
attach_function :blob_read, :sqlite3_blob_read, [Blob, :pointer, :int, :int], :int
-
# CAPI3REF: Write Data Into A BLOB Incrementally
- #
+
# ^This function is used to write data into an open (BLOB handle) from a
# caller-supplied buffer. ^N bytes of data are copied from the buffer Z
# into the open BLOB, starting at offset iOffset.
- #
+
# ^If the (BLOB handle) passed as the first argument was not opened for
# writing (the flags parameter to (sqlite3_blob_open()) was zero),
# this function returns (SQLITE_READONLY).
- #
+
# ^This function may only modify the contents of the BLOB; it is
# not possible to increase the size of a BLOB using this API.
# ^If offset iOffset is less than N bytes from the end of the BLOB,
@@ -5661,48 +5502,47 @@ class Blob < FFI::Struct
# less than zero (SQLITE_ERROR) is returned and no data is written.
# The size of the BLOB (and hence the maximum value of N+iOffset)
# can be determined using the (sqlite3_blob_bytes()) interface.
- #
+
# ^An attempt to write to an expired (BLOB handle) fails with an
# error code of (SQLITE_ABORT). ^Writes to the BLOB that occurred
# before the (BLOB handle) expired are not rolled back by the
# expiration of the handle, though of course those changes might
# have been overwritten by the statement that expired the BLOB handle
# or by other independent statements.
- #
+
# ^(On success, sqlite3_blob_write() returns SQLITE_OK.
# Otherwise, an (error code) or an (extended error code) is returned.)^
- #
+
# This routine only works on a (BLOB handle) which has been created
# by a prior successful call to (sqlite3_blob_open()) and which has not
# been closed by (sqlite3_blob_close()). Passing any other pointer in
# to this routine results in undefined and probably undesirable behavior.
- #
+
# See also: (sqlite3_blob_read()).
- #
+
# @method blob_write(blob, z, n, i_offset)
- # @param [Blob] blob
- # @param [FFI::Pointer(*Void)] z
- # @param [Integer] n
- # @param [Integer] i_offset
- # @return [Integer]
+ # @param [Blob] blob
+ # @param [FFI::Pointer(*Void)] z
+ # @param [Integer] n
+ # @param [Integer] i_offset
+ # @return [Integer]
# @scope class
attach_function :blob_write, :sqlite3_blob_write, [Blob, :pointer, :int, :int], :int
-
# CAPI3REF: Virtual File System Objects
- #
+
# A virtual filesystem (VFS) is an (sqlite3_vfs) object
# that SQLite uses to interact
# with the underlying operating system. Most SQLite builds come with a
# single default VFS that is appropriate for the host computer.
# New VFSes can be registered and existing VFSes can be unregistered.
# The following interfaces are provided.
- #
+
# ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.
# ^Names are case sensitive.
# ^Names are zero-terminated UTF-8 strings.
# ^If there is no match, a NULL pointer is returned.
# ^If zVfsName is NULL then the default VFS is returned.
- #
+
# ^New VFSes are registered with sqlite3_vfs_register().
# ^Each new VFS becomes the default VFS if the makeDflt flag is set.
# ^The same VFS can be registered multiple times without injury.
@@ -5711,59 +5551,56 @@ class Blob < FFI::Struct
# same name are registered, the behavior is undefined. If a
# VFS is registered with a name that is NULL or an empty string,
# then the behavior is undefined.
- #
+
# ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
# ^(If the default VFS is unregistered, another VFS is chosen as
# the default. The choice for the new VFS is arbitrary.)^
- #
+
# @method vfs_find(z_vfs_name)
- # @param [String] z_vfs_name
- # @return [Vfs]
+ # @param [String] z_vfs_name
+ # @return [Vfs]
# @scope class
attach_function :vfs_find, :sqlite3_vfs_find, [:string], Vfs
-
# (Not documented)
- #
+
# @method vfs_register(vfs, make_dflt)
- # @param [Vfs] vfs
- # @param [Integer] make_dflt
- # @return [Integer]
+ # @param [Vfs] vfs
+ # @param [Integer] make_dflt
+ # @return [Integer]
# @scope class
attach_function :vfs_register, :sqlite3_vfs_register, [Vfs, :int], :int
-
# (Not documented)
- #
+
# @method vfs_unregister(vfs)
- # @param [Vfs] vfs
- # @return [Integer]
+ # @param [Vfs] vfs
+ # @return [Integer]
# @scope class
attach_function :vfs_unregister, :sqlite3_vfs_unregister, [Vfs], :int
-
# CAPI3REF: Mutexes
- #
+
# The SQLite core uses these routines for thread
# synchronization. Though they are intended for internal
# use by SQLite, code that links against SQLite is
# permitted to use any of these routines.
- #
+
# The SQLite source code contains multiple implementations
# of these mutex routines. An appropriate implementation
# is selected automatically at compile-time. ^(The following
# implementations are available in the SQLite core:
- #
+
#
# - SQLITE_MUTEX_OS2
#
- SQLITE_MUTEX_PTHREAD
#
- SQLITE_MUTEX_W32
#
- SQLITE_MUTEX_NOOP
#
)^
- #
+
# ^The SQLITE_MUTEX_NOOP implementation is a set of routines
# that does no real locking and is appropriate for use in
# a single-threaded application. ^The SQLITE_MUTEX_OS2,
# SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations
# are appropriate for use on OS/2, Unix, and Windows.
- #
+
# ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
# macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
# implementation is included with the library. In this case the
@@ -5771,13 +5608,13 @@ class Blob < FFI::Struct
# (SQLITE_CONFIG_MUTEX) option of the sqlite3_config() function
# before calling sqlite3_initialize() or any other public sqlite3_
# function that calls sqlite3_initialize().)^
- #
+
# ^The sqlite3_mutex_alloc() routine allocates a new
# mutex and returns a pointer to it. ^If it returns NULL
# that means that a mutex could not be allocated. ^SQLite
# will unwind its stack and return an error. ^(The argument
# to sqlite3_mutex_alloc() is one of these integer constants:
- #
+
#
# - SQLITE_MUTEX_FAST
#
- SQLITE_MUTEX_RECURSIVE
@@ -5788,7 +5625,7 @@ class Blob < FFI::Struct
#
- SQLITE_MUTEX_STATIC_LRU
#
- SQLITE_MUTEX_STATIC_LRU2
#
)^
- #
+
# ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
# cause sqlite3_mutex_alloc() to create
# a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
@@ -5799,7 +5636,7 @@ class Blob < FFI::Struct
# cases where it really needs one. ^If a faster non-recursive mutex
# implementation is available on the host platform, the mutex subsystem
# might return such a mutex in response to SQLITE_MUTEX_FAST.
- #
+
# ^The other allowed parameters to sqlite3_mutex_alloc() (anything other
# than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return
# a pointer to a static preexisting mutex. ^Six static mutexes are
@@ -5808,20 +5645,20 @@ class Blob < FFI::Struct
# use by SQLite only. Applications that use SQLite mutexes should
# use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
# SQLITE_MUTEX_RECURSIVE.
- #
+
# ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
# or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
# returns a different mutex on every call. ^But for the static
# mutex types, the same mutex is returned on every call that has
# the same type number.
- #
+
# ^The sqlite3_mutex_free() routine deallocates a previously
# allocated dynamic mutex. ^SQLite is careful to deallocate every
# dynamic mutex that it allocates. The dynamic mutexes must not be in
# use when they are deallocated. Attempting to deallocate a static
# mutex results in undefined behavior. ^SQLite never deallocates
# a static mutex.
- #
+
# ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
# to enter a mutex. ^If another thread is already within the mutex,
# sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
@@ -5834,67 +5671,62 @@ class Blob < FFI::Struct
# kind of mutex more than once, the behavior is undefined.
# SQLite will never exhibit
# such behavior in its own use of mutexes.)^
- #
+
# ^(Some systems (for example, Windows 95) do not support the operation
# implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try()
# will always return SQLITE_BUSY. The SQLite core only ever uses
# sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^
- #
+
# ^The sqlite3_mutex_leave() routine exits a mutex that was
# previously entered by the same thread. ^(The behavior
# is undefined if the mutex is not currently entered by the
# calling thread or is not currently allocated. SQLite will
# never do either.)^
- #
+
# ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or
# sqlite3_mutex_leave() is a NULL pointer, then all three routines
# behave as no-ops.
- #
+
# See also: (sqlite3_mutex_held()) and (sqlite3_mutex_notheld()).
- #
+
# @method mutex_alloc(int)
- # @param [Integer] int
- # @return [Mutex]
+ # @param [Integer] int
+ # @return [Mutex]
# @scope class
attach_function :mutex_alloc, :sqlite3_mutex_alloc, [:int], Mutex
-
# (Not documented)
- #
+
# @method mutex_free(mutex)
- # @param [Mutex] mutex
- # @return [nil]
+ # @param [Mutex] mutex
+ # @return [nil]
# @scope class
attach_function :mutex_free, :sqlite3_mutex_free, [Mutex], :void
-
# (Not documented)
- #
+
# @method mutex_enter(mutex)
- # @param [Mutex] mutex
- # @return [nil]
+ # @param [Mutex] mutex
+ # @return [nil]
# @scope class
attach_function :mutex_enter, :sqlite3_mutex_enter, [Mutex], :void
-
# (Not documented)
- #
+
# @method mutex_try(mutex)
- # @param [Mutex] mutex
- # @return [Integer]
+ # @param [Mutex] mutex
+ # @return [Integer]
# @scope class
attach_function :mutex_try, :sqlite3_mutex_try, [Mutex], :int
-
# (Not documented)
- #
+
# @method mutex_leave(mutex)
- # @param [Mutex] mutex
- # @return [nil]
+ # @param [Mutex] mutex
+ # @return [nil]
# @scope class
attach_function :mutex_leave, :sqlite3_mutex_leave, [Mutex], :void
-
# CAPI3REF: Mutex Methods Object
- #
+
# An instance of this structure defines the low-level routines
# used to allocate and use mutexes.
- #
+
# Usually, the default mutex implementations provided by SQLite are
# sufficient, however the user has the option of substituting a custom
# implementation for specialized deployments or systems for which SQLite
@@ -5904,23 +5736,23 @@ class Blob < FFI::Struct
# Additionally, an instance of this structure can be used as an
# output variable when querying the system for the current mutex
# implementation, using the (SQLITE_CONFIG_GETMUTEX) option.
- #
+
# ^The xMutexInit method defined by this structure is invoked as
# part of system initialization by the sqlite3_initialize() function.
# ^The xMutexInit routine is called by SQLite exactly once for each
# effective call to (sqlite3_initialize()).
- #
+
# ^The xMutexEnd method defined by this structure is invoked as
# part of system shutdown by the sqlite3_shutdown() function. The
# implementation of this method is expected to release all outstanding
# resources obtained by the mutex methods implementation, especially
# those obtained by the xMutexInit method. ^The xMutexEnd()
# interface is invoked exactly once for each call to (sqlite3_shutdown()).
- #
+
# ^(The remaining seven methods defined by this structure (xMutexAlloc,
# xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
# xMutexNotheld) implement the following interfaces (respectively):
- #
+
#
# - (sqlite3_mutex_alloc())
# - (sqlite3_mutex_free())
@@ -5930,7 +5762,7 @@ class Blob < FFI::Struct
# - (sqlite3_mutex_held())
# - (sqlite3_mutex_notheld())
#
)^
- #
+
# The only difference is that the public sqlite3_XXX functions enumerated
# above silently ignore any invocations that pass a NULL pointer instead
# of a valid mutex handle. The implementations of the methods defined
@@ -5938,41 +5770,41 @@ class Blob < FFI::Struct
# of passing a NULL pointer instead of a valid mutex handle are undefined
# (i.e. it is acceptable to provide an implementation that segfaults if
# it is passed a NULL pointer).
- #
+
# The xMutexInit() method must be threadsafe. ^It must be harmless to
# invoke xMutexInit() multiple times within the same process and without
# intervening calls to xMutexEnd(). Second and subsequent calls to
# xMutexInit() must be no-ops.
- #
+
# ^xMutexInit() must not use SQLite memory allocation ((sqlite3_malloc())
# and its associates). ^Similarly, xMutexAlloc() must not use SQLite memory
# allocation for a static mutex. ^However xMutexAlloc() may use SQLite
# memory allocation for a fast or recursive mutex.
- #
+
# ^SQLite will invoke the xMutexEnd() method when (sqlite3_shutdown()) is
# called, but only if the prior call to xMutexInit returned SQLITE_OK.
# If xMutexInit fails in any way, it is expected to clean up after itself
# prior to returning.
- #
+
# = Fields:
# :x_mutex_init ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_mutex_end ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_mutex_alloc ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_mutex_free ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_mutex_enter ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_mutex_try ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_mutex_leave ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_mutex_held ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_mutex_notheld ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
class MutexMethods < FFI::Struct
layout :x_mutex_init, :pointer,
:x_mutex_end, :pointer,
@@ -5984,9 +5816,9 @@ class MutexMethods < FFI::Struct
:x_mutex_held, :pointer,
:x_mutex_notheld, :pointer
end
-
+
# CAPI3REF: Mutex Verification Routines
- #
+
# The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
# are intended for use inside assert() statements. ^The SQLite core
# never uses these routines except inside an assert() and applications
@@ -5995,15 +5827,15 @@ class MutexMethods < FFI::Struct
# with the SQLITE_DEBUG flag. ^External mutex implementations
# are only required to provide these routines if SQLITE_DEBUG is
# defined and if NDEBUG is not defined.
- #
+
# ^These routines should return true if the mutex in their argument
# is held or not held, respectively, by the calling thread.
- #
+
# ^The implementation is not required to provided versions of these
# routines that actually work. If the implementation does not provide working
# versions of these routines, it should at least provide stubs that always
# return true so that one does not get spurious assertion failures.
- #
+
# ^If the argument to sqlite3_mutex_held() is a NULL pointer then
# the routine should return 1. This seems counter-intuitive since
# clearly the mutex cannot be held if it does not exist. But
@@ -6012,37 +5844,34 @@ class MutexMethods < FFI::Struct
# call to sqlite3_mutex_held() to fail, so a non-zero return is
# the appropriate thing to do. ^The sqlite3_mutex_notheld()
# interface should also return 1 when given a NULL pointer.
- #
+
# @method mutex_held(mutex)
- # @param [Mutex] mutex
- # @return [Integer]
+ # @param [Mutex] mutex
+ # @return [Integer]
# @scope class
attach_function :mutex_held, :sqlite3_mutex_held, [Mutex], :int
-
# (Not documented)
- #
+
# @method mutex_notheld(mutex)
- # @param [Mutex] mutex
- # @return [Integer]
+ # @param [Mutex] mutex
+ # @return [Integer]
# @scope class
attach_function :mutex_notheld, :sqlite3_mutex_notheld, [Mutex], :int
-
# CAPI3REF: Retrieve the mutex for a database connection
- #
+
# ^This interface returns a pointer the (sqlite3_mutex) object that
# serializes access to the (database connection) given in the argument
# when the (threading mode) is Serialized.
# ^If the (threading mode) is Single-thread or Multi-thread then this
# routine returns a NULL pointer.
- #
+
# @method db_mutex(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [Mutex]
+ # @param [Sqlite3] sqlite3
+ # @return [Mutex]
# @scope class
attach_function :db_mutex, :sqlite3_db_mutex, [Sqlite3], Mutex
-
# CAPI3REF: Low-Level Control Of Database Files
- #
+
# ^The (sqlite3_file_control()) interface makes a direct call to the
# xFileControl method for the (sqlite3_io_methods) object associated
# with a particular database identified by the second argument. ^The
@@ -6055,13 +5884,13 @@ class MutexMethods < FFI::Struct
# are passed directly through to the second and third parameters of
# the xFileControl method. ^The return value of the xFileControl
# method becomes the return value of this routine.
- #
+
# ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes
# a pointer to the underlying (sqlite3_file) object to be written into
# the space pointed to by the 4th parameter. ^The SQLITE_FCNTL_FILE_POINTER
# case is a short-circuit path which does not actually invoke the
# underlying sqlite3_io_methods.xFileControl method.
- #
+
# ^If the second parameter (zDbName) does not match the name of any
# open database file, then SQLITE_ERROR is returned. ^This error
# code is not remembered and will not be recalled by (sqlite3_errcode())
@@ -6069,42 +5898,40 @@ class MutexMethods < FFI::Struct
# also return SQLITE_ERROR. There is no way to distinguish between
# an incorrect zDbName and an SQLITE_ERROR return from the underlying
# xFileControl method.
- #
+
# See also: (SQLITE_FCNTL_LOCKSTATE)
- #
+
# @method file_control(sqlite3, z_db_name, op, void)
- # @param [Sqlite3] sqlite3
- # @param [String] z_db_name
- # @param [Integer] op
- # @param [FFI::Pointer(*Void)] void
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [String] z_db_name
+ # @param [Integer] op
+ # @param [FFI::Pointer(*Void)] void
+ # @return [Integer]
# @scope class
attach_function :file_control, :sqlite3_file_control, [Sqlite3, :string, :int, :pointer], :int
-
# CAPI3REF: Testing Interface
- #
+
# ^The sqlite3_test_control() interface is used to read out internal
# state of SQLite and to inject faults into SQLite for testing
# purposes. ^The first parameter is an operation code that determines
# the number, meaning, and operation of all subsequent parameters.
- #
+
# This interface is not for use by applications. It exists solely
# for verifying the correct operation of the SQLite library. Depending
# on how the SQLite library is compiled, this interface might not exist.
- #
+
# The details of the operation codes, their meanings, the parameters
# they take, and what they do are all subject to change without notice.
# Unlike most of the SQLite API, this function is not guaranteed to
# operate consistently from one release to the next.
- #
+
# @method test_control(op)
- # @param [Integer] op
- # @return [Integer]
+ # @param [Integer] op
+ # @return [Integer]
# @scope class
attach_function :test_control, :sqlite3_test_control, [:int], :int
-
# CAPI3REF: SQLite Runtime Status
- #
+
# ^This interface is used to retrieve runtime status information
# about the performance of SQLite, and optionally to reset various
# highwater marks. ^The first argument is an integer code for
@@ -6118,30 +5945,29 @@ class MutexMethods < FFI::Struct
# nothing is written into *pHighwater and the resetFlag is ignored.)^
# ^(Other parameters record only the highwater mark and not the current
# value. For these latter parameters nothing is written into *pCurrent.)^
- #
+
# ^The sqlite3_status() routine returns SQLITE_OK on success and a
# non-zero (error code) on failure.
- #
+
# This routine is threadsafe but is not atomic. This routine can be
# called while other threads are running the same or different SQLite
# interfaces. However the values returned in *pCurrent and
# *pHighwater reflect the status of SQLite at different points in time
# and it is possible that another thread might change the parameter
# in between the times when *pCurrent and *pHighwater are written.
- #
+
# See also: (sqlite3_db_status())
- #
+
# @method status(op, p_current, p_highwater, reset_flag)
- # @param [Integer] op
- # @param [FFI::Pointer(*Int)] p_current
- # @param [FFI::Pointer(*Int)] p_highwater
- # @param [Integer] reset_flag
- # @return [Integer]
+ # @param [Integer] op
+ # @param [FFI::Pointer(*Int)] p_current
+ # @param [FFI::Pointer(*Int)] p_highwater
+ # @param [Integer] reset_flag
+ # @return [Integer]
# @scope class
attach_function :status, :sqlite3_status, [:int, :pointer, :pointer, :int], :int
-
# CAPI3REF: Database Connection Status
- #
+
# ^This interface is used to retrieve runtime status information
# about a single (database connection). ^The first argument is the
# database connection object to be interrogated. ^The second argument
@@ -6150,29 +5976,28 @@ class MutexMethods < FFI::Struct
# determines the parameter to interrogate. The set of
# (SQLITE_DBSTATUS options) is likely
# to grow in future releases of SQLite.
- #
+
# ^The current value of the requested parameter is written into *pCur
# and the highest instantaneous value is written into *pHiwtr. ^If
# the resetFlg is true, then the highest instantaneous value is
# reset back down to the current value.
- #
+
# ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
# non-zero (error code) on failure.
- #
+
# See also: (sqlite3_status()) and (sqlite3_stmt_status()).
- #
+
# @method db_status(sqlite3, op, p_cur, p_hiwtr, reset_flg)
- # @param [Sqlite3] sqlite3
- # @param [Integer] op
- # @param [FFI::Pointer(*Int)] p_cur
- # @param [FFI::Pointer(*Int)] p_hiwtr
- # @param [Integer] reset_flg
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [Integer] op
+ # @param [FFI::Pointer(*Int)] p_cur
+ # @param [FFI::Pointer(*Int)] p_hiwtr
+ # @param [Integer] reset_flg
+ # @return [Integer]
# @scope class
attach_function :db_status, :sqlite3_db_status, [Sqlite3, :int, :pointer, :pointer, :int], :int
-
# CAPI3REF: Prepared Statement Status
- #
+
# ^(Each prepared statement maintains various
# (SQLITE_STMTSTATUS counters) that measure the number
# of times it has performed specific operations.)^ These counters can
@@ -6181,7 +6006,7 @@ class MutexMethods < FFI::Struct
# the number of table searches or result rows, that would tend to indicate
# that the prepared statement is using a full table scan rather than
# an index.
- #
+
# ^(This interface is used to retrieve and reset counter values from
# a (prepared statement). The first argument is the prepared statement
# object to be interrogated. The second argument
@@ -6190,33 +6015,32 @@ class MutexMethods < FFI::Struct
# ^The current value of the requested counter is returned.
# ^If the resetFlg is true, then the counter is reset to zero after this
# interface call returns.
- #
+
# See also: (sqlite3_status()) and (sqlite3_db_status()).
- #
+
# @method stmt_status(stmt, op, reset_flg)
- # @param [Stmt] stmt
- # @param [Integer] op
- # @param [Integer] reset_flg
- # @return [Integer]
+ # @param [Stmt] stmt
+ # @param [Integer] op
+ # @param [Integer] reset_flg
+ # @return [Integer]
# @scope class
attach_function :stmt_status, :sqlite3_stmt_status, [Stmt, :int, :int], :int
-
# CAPI3REF: Custom Page Cache Object
- #
+
# The sqlite3_pcache type is opaque. It is implemented by
# the pluggable module. The SQLite core has no knowledge of
# its size or internal structure and never deals with the
# sqlite3_pcache object except by holding and passing pointers
# to the object.
- #
+
# See (sqlite3_pcache_methods) for additional information.
class Pcache < FFI::Struct
layout :dummy, :char
end
-
+
# CAPI3REF: Application Defined Page Cache.
# KEYWORDS: {page cache}
- #
+
# ^(The (sqlite3_config)((SQLITE_CONFIG_PCACHE), ...) interface can
# register an alternative page cache implementation by passing in an
# instance of the sqlite3_pcache_methods structure.)^
@@ -6228,16 +6052,16 @@ class Pcache < FFI::Struct
# that memory is allocated and released, and the policies used to
# determine exactly which parts of a database file are cached and for
# how long.
- #
+
# The alternative page cache mechanism is an
# extreme measure that is only needed by the most demanding applications.
# The built-in page cache is recommended for most uses.
- #
+
# ^(The contents of the sqlite3_pcache_methods structure are copied to an
# internal buffer by SQLite within the call to (sqlite3_config). Hence
# the application may discard the parameter after the call to
# (sqlite3_config()) returns.)^
- #
+
# ((the xInit() page cache method))
# ^(The xInit() method is called once for each effective
# call to (sqlite3_initialize()))^
@@ -6248,22 +6072,22 @@ class Pcache < FFI::Struct
# ^(If the xInit() method is NULL, then the
# built-in default page cache is used instead of the application defined
# page cache.)^
- #
+
# ((the xShutdown() page cache method))
# ^The xShutdown() method is called by (sqlite3_shutdown()).
# It can be used to clean up
# any outstanding resources before process shutdown, if required.
# ^The xShutdown() method may be NULL.
- #
+
# ^SQLite automatically serializes calls to the xInit method,
# so the xInit method need not be threadsafe. ^The
# xShutdown method is only called from (sqlite3_shutdown()) so it does
# not need to be threadsafe either. All other methods must be threadsafe
# in multithreaded applications.
- #
+
# ^SQLite will never invoke xInit() more than once without an intervening
# call to xShutdown().
- #
+
# ((the xCreate() page cache methods))
# ^SQLite invokes the xCreate() method to construct a new cache instance.
# SQLite will typically create one cache instance for each open database file,
@@ -6288,7 +6112,7 @@ class Pcache < FFI::Struct
# false will always have the "discard" flag set to true.
# ^Hence, a cache created with bPurgeable false will
# never contain any unpinned pages.
- #
+
# ((the xCachesize() page cache method))
# ^(The xCachesize() method may be called at any time by SQLite to set the
# suggested maximum cache-size (number of pages stored by) the cache
@@ -6296,11 +6120,11 @@ class Pcache < FFI::Struct
# the SQLite "(PRAGMA cache_size)" command.)^ As with the bPurgeable
# parameter, the implementation is not required to do anything with this
# value; it is advisory only.
- #
+
# ((the xPagecount() page cache methods))
# The xPagecount() method must return the number of pages currently
# stored in the cache, both pinned and unpinned.
- #
+
# ((the xFetch() page cache methods))
# The xFetch() method locates a page in the cache and returns a pointer to
# the page, or a NULL pointer.
@@ -6308,13 +6132,13 @@ class Pcache < FFI::Struct
# 8-byte boundary. The page to be fetched is determined by the key. ^The
# minimum key value is 1. After it has been retrieved using xFetch, the page
# is considered to be "pinned".
- #
+
# If the requested page is already in the page cache, then the page cache
# implementation must return a pointer to the page buffer with its content
# intact. If the requested page is not already in the cache, then the
# cache implementation should use the value of the createFlag
# parameter to help it determined what action to take:
- #
+
#
# | createFlag | Behaviour when page is not already in cache
# |
|---|
| 0 | Do not allocate a new page. Return NULL.
@@ -6323,13 +6147,13 @@ class Pcache < FFI::Struct
# |
| 2 | Make every effort to allocate a new page. Only return
# NULL if allocating a new page is effectively impossible.
# |
- #
+
# ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite
# will only use a createFlag of 2 after a prior call with a createFlag of 1
# failed.)^ In between the to xFetch() calls, SQLite may
# attempt to unpin one or more cache pages by spilling the content of
# pinned pages to disk and synching the operating system disk cache.
- #
+
# ((the xUnpin() page cache method))
# ^xUnpin() is called by SQLite with a pointer to a currently pinned page
# as its second argument. If the third parameter, discard, is non-zero,
@@ -6338,54 +6162,54 @@ class Pcache < FFI::Struct
# zero, then the page may be discarded or retained at the discretion of
# page cache implementation. ^The page cache implementation
# may choose to evict unpinned pages at any time.
- #
+
# The cache must not perform any reference counting. A single
# call to xUnpin() unpins the page regardless of the number of prior calls
# to xFetch().
- #
+
# ((the xRekey() page cache methods))
# The xRekey() method is used to change the key value associated with the
# page passed as the second argument. If the cache
# previously contains an entry associated with newKey, it must be
# discarded. ^Any prior cache entry associated with newKey is guaranteed not
# to be pinned.
- #
+
# When SQLite calls the xTruncate() method, the cache must discard all
# existing cache entries with page numbers (keys) greater than or equal
# to the value of the iLimit parameter passed to xTruncate(). If any
# of these pages are pinned, they are implicitly unpinned, meaning that
# they can be safely discarded.
- #
+
# ((the xDestroy() page cache method))
# ^The xDestroy() method is used to delete a cache allocated by xCreate().
# All resources associated with the specified cache should be freed. ^After
# calling the xDestroy() method, SQLite considers the (sqlite3_pcache*)
# handle invalid, and will not use it with any other sqlite3_pcache_methods
# functions.
- #
+
# = Fields:
# :p_arg ::
- # (FFI::Pointer(*Void))
+ # (FFI::Pointer(*Void))
# :x_init ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_shutdown ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_create ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_cachesize ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_pagecount ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_fetch ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_unpin ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_rekey ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_truncate ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
# :x_destroy ::
- # (FFI::Pointer(*))
+ # (FFI::Pointer(*FunctionProto))
class PcacheMethods < FFI::Struct
layout :p_arg, :pointer,
:x_init, :pointer,
@@ -6399,51 +6223,51 @@ class PcacheMethods < FFI::Struct
:x_truncate, :pointer,
:x_destroy, :pointer
end
-
+
# CAPI3REF: Online Backup Object
- #
+
# The sqlite3_backup object records state information about an ongoing
# online backup operation. ^The sqlite3_backup object is created by
# a call to (sqlite3_backup_init()) and is destroyed by a call to
# (sqlite3_backup_finish()).
- #
+
# See Also: (Using the SQLite Online Backup API)
module BackupWrappers
- # @param [Integer] n_page
- # @return [Integer]
+ # @param [Integer] n_page
+ # @return [Integer]
def step(n_page)
SQLite3.backup_step(self, n_page)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def finish()
SQLite3.backup_finish(self)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def remaining()
SQLite3.backup_remaining(self)
end
-
- # @return [Integer]
+
+ # @return [Integer]
def pagecount()
SQLite3.backup_pagecount(self)
end
end
-
+
class Backup < FFI::Struct
include BackupWrappers
layout :dummy, :char
end
-
+
# CAPI3REF: Online Backup API.
- #
+
# The backup API copies the content of one database into another.
# It is useful either for creating backups of databases or
# for copying in-memory databases to or from persistent files.
- #
+
# See Also: (Using the SQLite Online Backup API)
- #
+
# ^SQLite holds a write transaction open on the destination database file
# for the duration of the backup operation.
# ^The source database is read-locked only while it is being read;
@@ -6451,7 +6275,7 @@ class Backup < FFI::Struct
# ^Thus, the backup may be performed on a live source database without
# preventing other database connections from
# reading or writing to the source database while the backup is underway.
- #
+
# ^(To perform a backup operation:
#
# - sqlite3_backup_init() is called once to initialize the
@@ -6463,9 +6287,9 @@ class Backup < FFI::Struct
#
)^
# There should be exactly one call to sqlite3_backup_finish() for each
# successful call to sqlite3_backup_init().
- #
+
# ((sqlite3_backup_init())) sqlite3_backup_init()
- #
+
# ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the
# (database connection) associated with the destination database
# and the database name, respectively.
@@ -6478,7 +6302,7 @@ class Backup < FFI::Struct
# ^The source and destination (database connections) (parameters S and D)
# must be different or else sqlite3_backup_init(D,N,S,M) will fail with
# an error.
- #
+
# ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is
# returned and an error code and error message are stored in the
# destination (database connection) D.
@@ -6490,9 +6314,9 @@ class Backup < FFI::Struct
# ^The (sqlite3_backup) object may be used with the sqlite3_backup_step() and
# sqlite3_backup_finish() functions to perform the specified backup
# operation.
- #
+
# ((sqlite3_backup_step())) sqlite3_backup_step()
- #
+
# ^Function sqlite3_backup_step(B,N) will copy up to N pages between
# the source and destination databases specified by (sqlite3_backup) object B.
# ^If N is negative, all remaining source pages are copied.
@@ -6505,7 +6329,7 @@ class Backup < FFI::Struct
# (SQLITE_DONE), a call to sqlite3_backup_step() may return (SQLITE_READONLY),
# (SQLITE_NOMEM), (SQLITE_BUSY), (SQLITE_LOCKED), or an
# (SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX) extended error code.
- #
+
# ^(The sqlite3_backup_step() might return (SQLITE_READONLY) if
#
# - the destination database was opened read-only, or
@@ -6514,7 +6338,7 @@ class Backup < FFI::Struct
#
- the destination database is an in-memory database and the
# destination and source page sizes differ.
#
)^
- #
+
# ^If sqlite3_backup_step() cannot obtain a required file-system lock, then
# the (sqlite3_busy_handler | busy-handler function)
# is invoked (if one is specified). ^If the
@@ -6531,7 +6355,7 @@ class Backup < FFI::Struct
# errors are considered fatal.)^ The application must accept
# that the backup operation has failed and pass the backup operation handle
# to the sqlite3_backup_finish() to release associated resources.
- #
+
# ^The first call to sqlite3_backup_step() obtains an exclusive lock
# on the destination file. ^The exclusive lock is not released until either
# sqlite3_backup_finish() is called or the backup operation is complete
@@ -6547,9 +6371,9 @@ class Backup < FFI::Struct
# database is modified by the using the same database connection as is used
# by the backup operation, then the backup database is automatically
# updated at the same time.
- #
+
# ((sqlite3_backup_finish())) sqlite3_backup_finish()
- #
+
# When sqlite3_backup_step() has returned (SQLITE_DONE), or when the
# application wishes to abandon the backup operation, the application
# should destroy the (sqlite3_backup) by passing it to sqlite3_backup_finish().
@@ -6559,41 +6383,41 @@ class Backup < FFI::Struct
# active write-transaction on the destination database is rolled back.
# The (sqlite3_backup) object is invalid
# and may not be used following a call to sqlite3_backup_finish().
- #
+
# ^The value returned by sqlite3_backup_finish is (SQLITE_OK) if no
# sqlite3_backup_step() errors occurred, regardless or whether or not
# sqlite3_backup_step() completed.
# ^If an out-of-memory condition or IO error occurred during any prior
# sqlite3_backup_step() call on the same (sqlite3_backup) object, then
# sqlite3_backup_finish() returns the corresponding (error code).
- #
+
# ^A return of (SQLITE_BUSY) or (SQLITE_LOCKED) from sqlite3_backup_step()
# is not a permanent error and does not affect the return value of
# sqlite3_backup_finish().
- #
+
# ((sqlite3_backup__remaining())) ((sqlite3_backup_pagecount()))
# sqlite3_backup_remaining() and sqlite3_backup_pagecount()
- #
+
# ^Each call to sqlite3_backup_step() sets two values inside
# the (sqlite3_backup) object: the number of pages still to be backed
# up and the total number of pages in the source database file.
# The sqlite3_backup_remaining() and sqlite3_backup_pagecount() interfaces
# retrieve these two values, respectively.
- #
+
# ^The values returned by these functions are only updated by
# sqlite3_backup_step(). ^If the source database is modified during a backup
# operation, then the values are not updated to account for any extra
# pages that need to be updated or the size of the source database file
# changing.
- #
+
# Concurrent Usage of Database Handles
- #
+
# ^The source (database connection) may be used by the application for other
# purposes while a backup operation is underway or being initialized.
# ^If SQLite is compiled and configured to support threadsafe database
# connections, then the source database connection may be used concurrently
# from within other threads.
- #
+
# However, the application must guarantee that the destination
# (database connection) is not passed to any other API (by any thread) after
# sqlite3_backup_init() is called and before the corresponding call to
@@ -6602,65 +6426,60 @@ class Backup < FFI::Struct
# and so no error code is reported, but the operations may malfunction
# nevertheless. Use of the destination database connection while a
# backup is in progress might also also cause a mutex deadlock.
- #
+
# If running in (shared cache mode), the application must
# guarantee that the shared cache used by the destination database
# is not accessed while the backup is running. In practice this means
# that the application must guarantee that the disk file being
# backed up to is not accessed by any connection within the process,
# not just the specific connection that was passed to sqlite3_backup_init().
- #
+
# The (sqlite3_backup) object itself is partially threadsafe. Multiple
# threads may safely make multiple concurrent calls to sqlite3_backup_step().
# However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
# APIs are not strictly speaking threadsafe. If they are invoked at the
# same time as another thread is invoking sqlite3_backup_step() it is
# possible that they return invalid values.
- #
+
# @method backup_init(p_dest, z_dest_name, p_source, z_source_name)
- # @param [Sqlite3] p_dest
- # @param [String] z_dest_name
- # @param [Sqlite3] p_source
- # @param [String] z_source_name
- # @return [Backup]
+ # @param [Sqlite3] p_dest
+ # @param [String] z_dest_name
+ # @param [Sqlite3] p_source
+ # @param [String] z_source_name
+ # @return [Backup]
# @scope class
attach_function :backup_init, :sqlite3_backup_init, [Sqlite3, :string, Sqlite3, :string], Backup
-
# (Not documented)
- #
+
# @method backup_step(p, n_page)
- # @param [Backup] p
- # @param [Integer] n_page
- # @return [Integer]
+ # @param [Backup] p
+ # @param [Integer] n_page
+ # @return [Integer]
# @scope class
attach_function :backup_step, :sqlite3_backup_step, [Backup, :int], :int
-
# (Not documented)
- #
+
# @method backup_finish(p)
- # @param [Backup] p
- # @return [Integer]
+ # @param [Backup] p
+ # @return [Integer]
# @scope class
attach_function :backup_finish, :sqlite3_backup_finish, [Backup], :int
-
# (Not documented)
- #
+
# @method backup_remaining(p)
- # @param [Backup] p
- # @return [Integer]
+ # @param [Backup] p
+ # @return [Integer]
# @scope class
attach_function :backup_remaining, :sqlite3_backup_remaining, [Backup], :int
-
# (Not documented)
- #
+
# @method backup_pagecount(p)
- # @param [Backup] p
- # @return [Integer]
+ # @param [Backup] p
+ # @return [Integer]
# @scope class
attach_function :backup_pagecount, :sqlite3_backup_pagecount, [Backup], :int
-
# CAPI3REF: Unlock Notification
- #
+
# ^When running in shared-cache mode, a database operation may fail with
# an (SQLITE_LOCKED) error if the required locks on the shared-cache or
# individual tables within the shared-cache cannot be obtained. See
@@ -6669,12 +6488,12 @@ class Backup < FFI::Struct
# when the connection currently holding the required lock relinquishes it.
# ^This API is only available if the library was compiled with the
# (SQLITE_ENABLE_UNLOCK_NOTIFY) C-preprocessor symbol defined.
- #
+
# See Also: (Using the SQLite Unlock Notification Feature).
- #
+
# ^Shared-cache locks are released when a database connection concludes
# its current transaction, either by committing it or rolling it back.
- #
+
# ^When a connection (known as the blocked connection) fails to obtain a
# shared-cache lock and SQLITE_LOCKED is returned to the caller, the
# identity of the database connection (the blocking connection) that
@@ -6685,18 +6504,18 @@ class Backup < FFI::Struct
# when the blocking connections current transaction is concluded. ^The
# callback is invoked from within the (sqlite3_step) or (sqlite3_close)
# call that concludes the blocking connections transaction.
- #
+
# ^(If sqlite3_unlock_notify() is called in a multi-threaded application,
# there is a chance that the blocking connection will have already
# concluded its transaction by the time sqlite3_unlock_notify() is invoked.
# If this happens, then the specified callback is invoked immediately,
# from within the call to sqlite3_unlock_notify().)^
- #
+
# ^If the blocked connection is attempting to obtain a write-lock on a
# shared-cache table, and more than one other connection currently holds
# a read-lock on the same table, then SQLite arbitrarily selects one of
# the other connections to use as the blocking connection.
- #
+
# ^(There may be at most one unlock-notify callback registered by a
# blocked connection. If sqlite3_unlock_notify() is called when the
# blocked connection already has a registered unlock-notify callback,
@@ -6705,23 +6524,23 @@ class Backup < FFI::Struct
# unlock-notify callback is canceled. ^The blocked connections
# unlock-notify callback may also be canceled by closing the blocked
# connection using (sqlite3_close()).
- #
+
# The unlock-notify callback is not reentrant. If an application invokes
# any sqlite3_xxx API functions from within an unlock-notify callback, a
# crash or deadlock may be the result.
- #
+
# ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always
# returns SQLITE_OK.
- #
+
# Callback Invocation Details
- #
+
# When an unlock-notify callback is registered, the application provides a
# single void* pointer that is passed to the callback when it is invoked.
# However, the signature of the callback function allows SQLite to pass
# it an array of void* context pointers. The first argument passed to
# an unlock-notify callback is a pointer to an array of void* pointers,
# and the second is the number of entries in the array.
- #
+
# When a blocking connections transaction is concluded, there may be
# more than one blocked connection that has registered for an unlock-notify
# callback. ^If two or more such blocked connections have specified the
@@ -6730,9 +6549,9 @@ class Backup < FFI::Struct
# specified by the blocked connections bundled together into an array.
# This gives the application an opportunity to prioritize any actions
# related to the set of unblocked database connections.
- #
+
# Deadlock Detection
- #
+
# Assuming that after registering for an unlock-notify callback a
# database waits for the callback to be issued before taking any further
# action (a reasonable assumption), then using this API may cause the
@@ -6740,7 +6559,7 @@ class Backup < FFI::Struct
# connection Y's transaction to be concluded, and similarly connection
# Y is waiting on connection X's transaction, then neither connection
# will proceed and the system may remain deadlocked indefinitely.
- #
+
# To avoid this scenario, the sqlite3_unlock_notify() performs deadlock
# detection. ^If a given call to sqlite3_unlock_notify() would put the
# system in a deadlocked state, then SQLITE_LOCKED is returned and no
@@ -6753,9 +6572,9 @@ class Backup < FFI::Struct
# registered for an unlock-notify callback on the conclusion of connection
# C's transaction, where connection C is waiting on connection A. ^Any
# number of levels of indirection are allowed.
- #
+
# The "DROP TABLE" Exception
- #
+
# When a call to (sqlite3_step()) returns SQLITE_LOCKED, it is almost
# always appropriate to call sqlite3_unlock_notify(). There is however,
# one exception. When executing a "DROP TABLE" or "DROP INDEX" statement,
@@ -6765,74 +6584,71 @@ class Backup < FFI::Struct
# sqlite3_unlock_notify() results in the unlock-notify callback being
# invoked immediately. If the application then re-attempts the "DROP TABLE"
# or "DROP INDEX" query, an infinite loop might be the result.
- #
+
# One way around this problem is to check the extended error code returned
# by an sqlite3_step() call. ^(If there is a blocking connection, then the
# extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
# the special "DROP TABLE/INDEX" case, the extended error code is just
# SQLITE_LOCKED.)^
- #
+
# @method unlock_notify(p_blocked, x_notify, p_notify_arg)
- # @param [Sqlite3] p_blocked
- # @param [FFI::Pointer(*)] x_notify
- # @param [FFI::Pointer(*Void)] p_notify_arg
- # @return [Integer]
+ # @param [Sqlite3] p_blocked
+ # @param [FFI::Pointer(*FunctionProto)] x_notify
+ # @param [FFI::Pointer(*Void)] p_notify_arg
+ # @return [Integer]
# @scope class
attach_function :unlock_notify, :sqlite3_unlock_notify, [Sqlite3, :pointer, :pointer], :int
-
# CAPI3REF: String Comparison
- #
+
# ^The (sqlite3_strnicmp()) API allows applications and extensions to
# compare the contents of two buffers containing UTF-8 strings in a
# case-independent fashion, using the same definition of case independence
# that SQLite uses internally when comparing identifiers.
- #
+
# @method strnicmp(string, string, int)
- # @param [String] string
- # @param [String] string
- # @param [Integer] int
- # @return [Integer]
+ # @param [String] string
+ # @param [String] string
+ # @param [Integer] int
+ # @return [Integer]
# @scope class
attach_function :strnicmp, :sqlite3_strnicmp, [:string, :string, :int], :int
-
# CAPI3REF: Error Logging Interface
- #
+
# ^The (sqlite3_log()) interface writes a message into the error log
# established by the (SQLITE_CONFIG_LOG) option to (sqlite3_config()).
# ^If logging is enabled, the zFormat string and subsequent arguments are
# used with (sqlite3_snprintf()) to generate the final output string.
- #
+
# The sqlite3_log() interface is intended for use by extensions such as
# virtual tables, collating functions, and SQL functions. While there is
# nothing to prevent an application from calling sqlite3_log(), doing so
# is considered bad form.
- #
+
# The zFormat string must not be NULL.
- #
+
# To avoid deadlocks and other threading problems, the sqlite3_log() routine
# will not use dynamically allocated memory. The log message is stored in
# a fixed-length buffer on the stack. If the log message is longer than
# a few hundred characters, it will be truncated to the length of the
# buffer.
- #
+
# @method log(i_err_code, z_format)
- # @param [Integer] i_err_code
- # @param [String] z_format
- # @return [nil]
+ # @param [Integer] i_err_code
+ # @param [String] z_format
+ # @return [nil]
# @scope class
attach_function :log, :sqlite3_log, [:int, :string], :void
-
# CAPI3REF: Write-Ahead Log Commit Hook
- #
+
# ^The (sqlite3_wal_hook()) function is used to register a callback that
# will be invoked each time a database connection commits data to a
# (write-ahead log) (i.e. whenever a transaction is committed in
# (journal_mode | journal_mode=WAL mode)).
- #
+
# ^The callback is invoked by SQLite after the commit has taken place and
# the associated write-lock on the database released, so the implementation
# may read, write or (checkpoint) the database as required.
- #
+
# ^The first parameter passed to the callback function when it is invoked
# is a copy of the third parameter passed to sqlite3_wal_hook() when
# registering the callback. ^The second is a copy of the database handle.
@@ -6840,7 +6656,7 @@ class Backup < FFI::Struct
# either "main" or the name of an (ATTACH)-ed database. ^The fourth parameter
# is the number of pages currently in the write-ahead log file,
# including those that were just committed.
- #
+
# The callback function should normally return (SQLITE_OK). ^If an error
# code is returned, that error will propagate back up through the
# SQLite code base to cause the statement that provoked the callback
@@ -6848,24 +6664,23 @@ class Backup < FFI::Struct
# callback returns (SQLITE_ROW) or (SQLITE_DONE), or if it returns a value
# that does not correspond to any valid SQLite error code, the results
# are undefined.
- #
+
# A single database handle may have at most a single write-ahead log callback
# registered at one time. ^Calling (sqlite3_wal_hook()) replaces any
# previously registered write-ahead log callback. ^Note that the
# (sqlite3_wal_autocheckpoint()) interface and the
# (wal_autocheckpoint pragma) both invoke (sqlite3_wal_hook()) and will
# those overwrite any prior (sqlite3_wal_hook()) settings.
- #
- # @method wal_hook(sqlite3, , void)
- # @param [Sqlite3] sqlite3
- # @param [FFI::Pointer(*)]
- # @param [FFI::Pointer(*Void)] void
- # @return [FFI::Pointer(*Void)]
+
+ # @method wal_hook(sqlite3, functionproto, void)
+ # @param [Sqlite3] sqlite3
+ # @param [FFI::Pointer(*FunctionProto)] functionproto
+ # @param [FFI::Pointer(*Void)] void
+ # @return [FFI::Pointer(*Void)]
# @scope class
attach_function :wal_hook, :sqlite3_wal_hook, [Sqlite3, :pointer, :pointer], :pointer
-
# CAPI3REF: Configure an auto-checkpoint
- #
+
# ^The (sqlite3_wal_autocheckpoint(D,N)) is a wrapper around
# (sqlite3_wal_hook()) that causes any database on (database connection) D
# to automatically (checkpoint)
@@ -6873,70 +6688,68 @@ class Backup < FFI::Struct
# more frames in the (write-ahead log) file. ^Passing zero or
# a negative value as the nFrame parameter disables automatic
# checkpoints entirely.
- #
+
# ^The callback registered by this function replaces any existing callback
# registered using (sqlite3_wal_hook()). ^Likewise, registering a callback
# using (sqlite3_wal_hook()) disables the automatic checkpoint mechanism
# configured by this function.
- #
+
# ^The (wal_autocheckpoint pragma) can be used to invoke this interface
# from SQL.
- #
+
# ^Every new (database connection) defaults to having the auto-checkpoint
# enabled with a threshold of 1000 or (SQLITE_DEFAULT_WAL_AUTOCHECKPOINT)
# pages. The use of this interface
# is only necessary if the default setting is found to be suboptimal
# for a particular application.
- #
+
# @method wal_autocheckpoint(db, n)
- # @param [Sqlite3] db
- # @param [Integer] n
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [Integer] n
+ # @return [Integer]
# @scope class
attach_function :wal_autocheckpoint, :sqlite3_wal_autocheckpoint, [Sqlite3, :int], :int
-
# CAPI3REF: Checkpoint a database
- #
+
# ^The (sqlite3_wal_checkpoint(D,X)) interface causes database named X
# on (database connection) D to be (checkpointed). ^If X is NULL or an
# empty string, then a checkpoint is run on all databases of
# connection D. ^If the database connection D is not in
# (WAL | write-ahead log mode) then this interface is a harmless no-op.
- #
+
# ^The (wal_checkpoint pragma) can be used to invoke this interface
# from SQL. ^The (sqlite3_wal_autocheckpoint()) interface and the
# (wal_autocheckpoint pragma) can be used to cause this interface to be
# run whenever the WAL reaches a certain size threshold.
- #
+
# See also: (sqlite3_wal_checkpoint_v2())
- #
+
# @method wal_checkpoint(db, z_db)
- # @param [Sqlite3] db
- # @param [String] z_db
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_db
+ # @return [Integer]
# @scope class
attach_function :wal_checkpoint, :sqlite3_wal_checkpoint, [Sqlite3, :string], :int
-
# CAPI3REF: Checkpoint a database
- #
+
# Run a checkpoint operation on WAL database zDb attached to database
# handle db. The specific operation is determined by the value of the
# eMode parameter:
- #
+
#
# - SQLITE_CHECKPOINT_PASSIVE
-
# Checkpoint as many frames as possible without waiting for any database
# readers or writers to finish. Sync the db file if all frames in the log
# are checkpointed. This mode is the same as calling
# sqlite3_wal_checkpoint(). The busy-handler callback is never invoked.
- #
+
#
- SQLITE_CHECKPOINT_FULL
-
# This mode blocks (calls the busy-handler callback) until there is no
# database writer and all readers are reading from the most recent database
# snapshot. It then checkpoints all frames in the log file and syncs the
# database file. This call blocks database writers while it is running,
# but not database readers.
- #
+
#
- SQLITE_CHECKPOINT_RESTART
-
# This mode works the same way as SQLITE_CHECKPOINT_FULL, except after
# checkpointing the log file it blocks (calls the busy-handler callback)
@@ -6945,7 +6758,7 @@ class Backup < FFI::Struct
# from the beginning. This call blocks database writers while it is running,
# but not database readers.
#
- #
+
# If pnLog is not NULL, then *pnLog is set to the total number of frames in
# the log file before returning. If pnCkpt is not NULL, then *pnCkpt is set to
# the total number of checkpointed frames (including any that were already
@@ -6953,12 +6766,12 @@ class Backup < FFI::Struct
# populated even if sqlite3_wal_checkpoint_v2() returns other than SQLITE_OK.
# If no values are available because of an error, they are both set to -1
# before returning to communicate this to the caller.
- #
+
# All calls obtain an exclusive "checkpoint" lock on the database file. If
# any other process is running a checkpoint operation at the same time, the
# lock cannot be obtained and SQLITE_BUSY is returned. Even if there is a
# busy-handler configured, it will not be invoked in this case.
- #
+
# The SQLITE_CHECKPOINT_FULL and RESTART modes also obtain the exclusive
# "writer" lock on the database file. If the writer lock cannot be obtained
# immediately, and a busy-handler is configured, it is invoked and the writer
@@ -6969,7 +6782,7 @@ class Backup < FFI::Struct
# checkpoint operation proceeds from that point in the same way as
# SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible
# without blocking any further. SQLITE_BUSY is returned in this case.
- #
+
# If parameter zDb is NULL or points to a zero length string, then the
# specified operation is attempted on all WAL databases. In this case the
# values written to output parameters *pnLog and *pnCkpt are undefined. If
@@ -6980,86 +6793,82 @@ class Backup < FFI::Struct
# and the error code returned to the caller immediately. If no error
# (SQLITE_BUSY or otherwise) is encountered while processing the attached
# databases, SQLITE_OK is returned.
- #
+
# If database zDb is the name of an attached database that is not in WAL
# mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. If
# zDb is not NULL (or a zero length string) and is not the name of any
# attached database, SQLITE_ERROR is returned to the caller.
- #
+
# @method wal_checkpoint_v2(db, z_db, e_mode, pn_log, pn_ckpt)
- # @param [Sqlite3] db
- # @param [String] z_db
- # @param [Integer] e_mode
- # @param [FFI::Pointer(*Int)] pn_log
- # @param [FFI::Pointer(*Int)] pn_ckpt
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_db
+ # @param [Integer] e_mode
+ # @param [FFI::Pointer(*Int)] pn_log
+ # @param [FFI::Pointer(*Int)] pn_ckpt
+ # @return [Integer]
# @scope class
attach_function :wal_checkpoint_v2, :sqlite3_wal_checkpoint_v2, [Sqlite3, :string, :int, :pointer, :pointer], :int
-
# CAPI3REF: Virtual Table Interface Configuration
- #
+
# This function may be called by either the (xConnect) or (xCreate) method
# of a (virtual table) implementation to configure
# various facets of the virtual table interface.
- #
+
# If this interface is invoked outside the context of an xConnect or
# xCreate virtual table method then the behavior is undefined.
- #
+
# At present, there is only one option that may be configured using
# this function. (See (SQLITE_VTAB_CONSTRAINT_SUPPORT).) Further options
# may be added in the future.
- #
+
# @method vtab_config(sqlite3, op)
- # @param [Sqlite3] sqlite3
- # @param [Integer] op
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @param [Integer] op
+ # @return [Integer]
# @scope class
attach_function :vtab_config, :sqlite3_vtab_config, [Sqlite3, :int], :int
-
# CAPI3REF: Determine The Virtual Table Conflict Policy
- #
+
# This function may only be called from within a call to the (xUpdate) method
# of a (virtual table) implementation for an INSERT or UPDATE operation. ^The
# value returned is one of (SQLITE_ROLLBACK), (SQLITE_IGNORE), (SQLITE_FAIL),
# (SQLITE_ABORT), or (SQLITE_REPLACE), according to the (ON CONFLICT) mode
# of the SQL statement that triggered the call to the (xUpdate) method of the
# (virtual table).
- #
+
# @method vtab_on_conflict(sqlite3)
- # @param [Sqlite3] sqlite3
- # @return [Integer]
+ # @param [Sqlite3] sqlite3
+ # @return [Integer]
# @scope class
attach_function :vtab_on_conflict, :sqlite3_vtab_on_conflict, [Sqlite3], :int
-
# Register a geometry callback named zGeom that can be used as part of an
# R-Tree geometry query as follows:
- #
+
# SELECT ... FROM WHERE MATCH $zGeom(... params ...)
- #
+
# @method rtree_geometry_callback(db, z_geom, x_geom, p_context)
- # @param [Sqlite3] db
- # @param [String] z_geom
- # @param [FFI::Pointer(*)] x_geom
- # @param [FFI::Pointer(*Void)] p_context
- # @return [Integer]
+ # @param [Sqlite3] db
+ # @param [String] z_geom
+ # @param [FFI::Pointer(*FunctionProto)] x_geom
+ # @param [FFI::Pointer(*Void)] p_context
+ # @return [Integer]
# @scope class
attach_function :rtree_geometry_callback, :sqlite3_rtree_geometry_callback, [Sqlite3, :string, :pointer, :pointer], :int
-
# 2010 August 30
- #
+
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
- #
+
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
- #
- #
- #
- #
+
+
+
+
# A pointer to a structure of the following type is passed as the first
# argument to callbacks registered using rtree_geometry_callback().
- #
+
# = Fields:
# :p_context ::
# (FFI::Pointer(*Void)) Copy of pContext passed to s_r_g_c()
@@ -7070,7 +6879,7 @@ class Backup < FFI::Struct
# :p_user ::
# (FFI::Pointer(*Void)) Callback implementation user data
# :x_del_user ::
- # (FFI::Pointer(*)) Called by SQLite to clean up pUser
+ # (FFI::Pointer(*FunctionProto)) Called by SQLite to clean up pUser
class RtreeGeometry < FFI::Struct
layout :p_context, :pointer,
:n_param, :int,
@@ -7078,5 +6887,5 @@ class RtreeGeometry < FFI::Struct
:p_user, :pointer,
:x_del_user, :pointer
end
-
+
end