lib-ruby-parser (C bindings)
4.0.4+ruby-3.1.1
C bindings for lib-ruby-parser library
|
Classes | |
struct | LIB_RUBY_PARSER_String |
struct | LIB_RUBY_PARSER_MaybeString |
Functions | |
LIB_RUBY_PARSER_String | LIB_RUBY_PARSER_new_string_owned (char *s, size_t len) |
LIB_RUBY_PARSER_String | LIB_RUBY_PARSER_new_string_from_cstr (const char *s) |
void | LIB_RUBY_PARSER_drop_string (LIB_RUBY_PARSER_String *string) |
bool | LIB_RUBY_PARSER_maybe_string_is_some (const LIB_RUBY_PARSER_MaybeString *maybe_string) |
bool | LIB_RUBY_PARSER_maybe_string_is_none (const LIB_RUBY_PARSER_MaybeString *maybe_string) |
void | LIB_RUBY_PARSER_drop_maybe_string (LIB_RUBY_PARSER_MaybeString *maybe_string) |
void LIB_RUBY_PARSER_drop_maybe_string | ( | LIB_RUBY_PARSER_MaybeString * | maybe_string | ) |
MaybeString destructor. Just like Rust/C++ destructor it performs cleanup of "embedded" resources. i.e. it doesn't call free
on a given pointer.
void LIB_RUBY_PARSER_drop_string | ( | LIB_RUBY_PARSER_String * | string | ) |
String destructor. Just like Rust/C++ destructor it performs cleanup of "embedded" resources. i.e. it doesn't call free
on a given pointer.
bool LIB_RUBY_PARSER_maybe_string_is_none | ( | const LIB_RUBY_PARSER_MaybeString * | maybe_string | ) |
Returns true
if given pointer is None
bool LIB_RUBY_PARSER_maybe_string_is_some | ( | const LIB_RUBY_PARSER_MaybeString * | maybe_string | ) |
Returns true
if given pointer is Some(String)
LIB_RUBY_PARSER_String LIB_RUBY_PARSER_new_string_from_cstr | ( | const char * | s | ) |
Construts String from a constant NULL-terminated C stirng. Copies the data, useful for testing.
LIB_RUBY_PARSER_String LIB_RUBY_PARSER_new_string_owned | ( | char * | s, |
size_t | len | ||
) |
Constructs String from ptr+length. Takes ownership, zero-copy.