Don't perform platform-specific name mangling on C functions for bindings
This commit is contained in:
parent
29dfa05504
commit
e61edf5398
2 changed files with 2 additions and 56 deletions
|
|
@ -8,6 +8,7 @@ bindgen \
|
|||
--whitelist-type '^TS.*' \
|
||||
--whitelist-function '^ts_.*' \
|
||||
--opaque-type FILE \
|
||||
--distrust-clang-mangling \
|
||||
$header_path > $output_path
|
||||
|
||||
echo "" >> $output_path
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* automatically generated by rust-bindgen */
|
||||
|
||||
pub type FILE = [u64; 19usize];
|
||||
pub type TSSymbol = ::std::os::raw::c_ushort;
|
||||
pub type TSSymbol = u16;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct TSLanguage {
|
||||
|
|
@ -93,43 +93,33 @@ pub struct TSTreeCursor {
|
|||
pub tree: *const ::std::os::raw::c_void,
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_new"]
|
||||
pub fn ts_parser_new() -> *mut TSParser;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_delete"]
|
||||
pub fn ts_parser_delete(arg1: *mut TSParser);
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_language"]
|
||||
pub fn ts_parser_language(arg1: *const TSParser) -> *const TSLanguage;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_set_language"]
|
||||
pub fn ts_parser_set_language(arg1: *mut TSParser, arg2: *const TSLanguage) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_logger"]
|
||||
pub fn ts_parser_logger(arg1: *const TSParser) -> TSLogger;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_set_logger"]
|
||||
pub fn ts_parser_set_logger(arg1: *mut TSParser, arg2: TSLogger);
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_print_dot_graphs"]
|
||||
pub fn ts_parser_print_dot_graphs(arg1: *mut TSParser, arg2: *mut FILE);
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_halt_on_error"]
|
||||
pub fn ts_parser_halt_on_error(arg1: *mut TSParser, arg2: bool);
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_parse"]
|
||||
pub fn ts_parser_parse(arg1: *mut TSParser, arg2: *const TSTree, arg3: TSInput) -> *mut TSTree;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_parser_parse_string"]
|
||||
pub fn ts_parser_parse_string(
|
||||
arg1: *mut TSParser,
|
||||
arg2: *const TSTree,
|
||||
|
|
@ -138,23 +128,18 @@ extern "C" {
|
|||
) -> *mut TSTree;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_copy"]
|
||||
pub fn ts_tree_copy(arg1: *const TSTree) -> *mut TSTree;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_delete"]
|
||||
pub fn ts_tree_delete(arg1: *mut TSTree);
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_root_node"]
|
||||
pub fn ts_tree_root_node(arg1: *const TSTree) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_edit"]
|
||||
pub fn ts_tree_edit(arg1: *mut TSTree, arg2: *const TSInputEdit);
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_get_changed_ranges"]
|
||||
pub fn ts_tree_get_changed_ranges(
|
||||
arg1: *const TSTree,
|
||||
arg2: *const TSTree,
|
||||
|
|
@ -162,120 +147,91 @@ extern "C" {
|
|||
) -> *mut TSRange;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_print_dot_graph"]
|
||||
pub fn ts_tree_print_dot_graph(arg1: *const TSTree, arg2: *mut FILE);
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_start_byte"]
|
||||
pub fn ts_node_start_byte(arg1: TSNode) -> u32;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_start_point"]
|
||||
pub fn ts_node_start_point(arg1: TSNode) -> TSPoint;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_end_byte"]
|
||||
pub fn ts_node_end_byte(arg1: TSNode) -> u32;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_end_point"]
|
||||
pub fn ts_node_end_point(arg1: TSNode) -> TSPoint;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_symbol"]
|
||||
pub fn ts_node_symbol(arg1: TSNode) -> TSSymbol;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_type"]
|
||||
pub fn ts_node_type(arg1: TSNode) -> *const ::std::os::raw::c_char;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_string"]
|
||||
pub fn ts_node_string(arg1: TSNode) -> *mut ::std::os::raw::c_char;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_eq"]
|
||||
pub fn ts_node_eq(arg1: TSNode, arg2: TSNode) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_is_null"]
|
||||
pub fn ts_node_is_null(arg1: TSNode) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_is_named"]
|
||||
pub fn ts_node_is_named(arg1: TSNode) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_is_missing"]
|
||||
pub fn ts_node_is_missing(arg1: TSNode) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_has_changes"]
|
||||
pub fn ts_node_has_changes(arg1: TSNode) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_has_error"]
|
||||
pub fn ts_node_has_error(arg1: TSNode) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_parent"]
|
||||
pub fn ts_node_parent(arg1: TSNode) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_child"]
|
||||
pub fn ts_node_child(arg1: TSNode, arg2: u32) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_named_child"]
|
||||
pub fn ts_node_named_child(arg1: TSNode, arg2: u32) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_child_count"]
|
||||
pub fn ts_node_child_count(arg1: TSNode) -> u32;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_named_child_count"]
|
||||
pub fn ts_node_named_child_count(arg1: TSNode) -> u32;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_next_sibling"]
|
||||
pub fn ts_node_next_sibling(arg1: TSNode) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_next_named_sibling"]
|
||||
pub fn ts_node_next_named_sibling(arg1: TSNode) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_prev_sibling"]
|
||||
pub fn ts_node_prev_sibling(arg1: TSNode) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_prev_named_sibling"]
|
||||
pub fn ts_node_prev_named_sibling(arg1: TSNode) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_first_child_for_byte"]
|
||||
pub fn ts_node_first_child_for_byte(arg1: TSNode, arg2: u32) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_first_named_child_for_byte"]
|
||||
pub fn ts_node_first_named_child_for_byte(arg1: TSNode, arg2: u32) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_descendant_for_byte_range"]
|
||||
pub fn ts_node_descendant_for_byte_range(arg1: TSNode, arg2: u32, arg3: u32) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_named_descendant_for_byte_range"]
|
||||
pub fn ts_node_named_descendant_for_byte_range(arg1: TSNode, arg2: u32, arg3: u32) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_descendant_for_point_range"]
|
||||
pub fn ts_node_descendant_for_point_range(arg1: TSNode, arg2: TSPoint, arg3: TSPoint)
|
||||
-> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_node_named_descendant_for_point_range"]
|
||||
pub fn ts_node_named_descendant_for_point_range(
|
||||
arg1: TSNode,
|
||||
arg2: TSPoint,
|
||||
|
|
@ -283,50 +239,39 @@ extern "C" {
|
|||
) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_cursor_new"]
|
||||
pub fn ts_tree_cursor_new(arg1: *const TSTree) -> TSTreeCursor;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_cursor_delete"]
|
||||
pub fn ts_tree_cursor_delete(arg1: *mut TSTreeCursor);
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_cursor_goto_first_child"]
|
||||
pub fn ts_tree_cursor_goto_first_child(arg1: *mut TSTreeCursor) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_cursor_goto_first_child_for_byte"]
|
||||
pub fn ts_tree_cursor_goto_first_child_for_byte(arg1: *mut TSTreeCursor, arg2: u32) -> i64;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_cursor_goto_next_sibling"]
|
||||
pub fn ts_tree_cursor_goto_next_sibling(arg1: *mut TSTreeCursor) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_cursor_goto_parent"]
|
||||
pub fn ts_tree_cursor_goto_parent(arg1: *mut TSTreeCursor) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_tree_cursor_current_node"]
|
||||
pub fn ts_tree_cursor_current_node(arg1: *const TSTreeCursor) -> TSNode;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_language_symbol_count"]
|
||||
pub fn ts_language_symbol_count(arg1: *const TSLanguage) -> u32;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_language_symbol_name"]
|
||||
pub fn ts_language_symbol_name(
|
||||
arg1: *const TSLanguage,
|
||||
arg2: TSSymbol,
|
||||
) -> *const ::std::os::raw::c_char;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_language_symbol_type"]
|
||||
pub fn ts_language_symbol_type(arg1: *const TSLanguage, arg2: TSSymbol) -> TSSymbolType;
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "\u{1}_ts_language_version"]
|
||||
pub fn ts_language_version(arg1: *const TSLanguage) -> u32;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue