Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/prism/util/pm_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void pm_string_owned_init(pm_string_t *string, uint8_t *source, size_t length);
* @param source The source of the string.
* @param length The length of the string.
*/
void pm_string_constant_init(pm_string_t *string, const char *source, size_t length);
PRISM_EXPORTED_FUNCTION void pm_string_constant_init(pm_string_t *string, const char *source, size_t length);

/**
* Represents the result of calling pm_string_mapped_init or
Expand Down
21 changes: 21 additions & 0 deletions rust/ruby-prism-sys/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ fn generate_bindings(ruby_include_path: &Path) -> bindgen::Bindings {
.allowlist_type("pm_magic_comment_t")
.allowlist_type("pm_node_t")
.allowlist_type("pm_node_type")
.allowlist_type("pm_options_t")
.allowlist_type("pm_options_scope_t")
.allowlist_type("pm_options_version_t")
.allowlist_type("pm_parser_t")
.allowlist_type("pm_string_t")
.allowlist_type(r"^pm_\w+_node_t")
Expand All @@ -128,20 +131,38 @@ fn generate_bindings(ruby_include_path: &Path) -> bindgen::Bindings {
.rustified_non_exhaustive_enum("pm_comment_type_t")
.rustified_non_exhaustive_enum(r"pm_\w+_flags")
.rustified_non_exhaustive_enum("pm_node_type")
.rustified_non_exhaustive_enum("pm_options_version_t")
// Functions
.allowlist_function("pm_arena_free")
.allowlist_function("pm_list_empty_p")
.allowlist_function("pm_list_free")
.allowlist_function("pm_options_command_line_set")
.allowlist_function("pm_options_encoding_locked_set")
.allowlist_function("pm_options_encoding_set")
.allowlist_function("pm_options_filepath_set")
.allowlist_function("pm_options_free")
.allowlist_function("pm_options_frozen_string_literal_set")
.allowlist_function("pm_options_line_set")
.allowlist_function("pm_options_main_script_set")
.allowlist_function("pm_options_partial_script_set")
.allowlist_function("pm_options_scope_forwarding_set")
.allowlist_function("pm_options_scope_get")
.allowlist_function("pm_options_scope_init")
.allowlist_function("pm_options_scope_local_get")
.allowlist_function("pm_options_scopes_init")
.allowlist_function("pm_parse")
.allowlist_function("pm_parser_free")
.allowlist_function("pm_parser_init")
.allowlist_function("pm_size_to_native")
.allowlist_function("pm_string_constant_init")
.allowlist_function("pm_string_free")
.allowlist_function("pm_string_length")
.allowlist_function("pm_string_source")
.allowlist_function("pm_version")
// Vars
.allowlist_var(r"^pm_encoding\S+")
.allowlist_var(r"^PM_OPTIONS_COMMAND_LINE_\w+")
.allowlist_var(r"^PM_OPTIONS_SCOPE_FORWARDING_\w+")
.generate()
.expect("Unable to generate prism bindings")
}
Expand Down
Loading