lib-ruby-parser (C bindings)
4.0.4+ruby-3.1.1
C bindings for lib-ruby-parser library
|
A set of structs and functions to work with byte sequences. lib-ruby-parser
takes a sequence of Bytes
as an input. Also some AST nodes that accept non-UTF-8 byte sequence also store Bytes
.
More...
Classes | |
struct | LIB_RUBY_PARSER_ByteList |
struct | LIB_RUBY_PARSER_Bytes |
Functions | |
void | LIB_RUBY_PARSER_drop_byte_list (LIB_RUBY_PARSER_ByteList *byte_list) |
LIB_RUBY_PARSER_ByteList | LIB_RUBY_PARSER_new_bytes_owned (char *s, size_t len) |
LIB_RUBY_PARSER_ByteList | LIB_RUBY_PARSER_new_bytes_from_cstr (const char *s, size_t len) |
void | LIB_RUBY_PARSER_drop_bytes (LIB_RUBY_PARSER_Bytes *bytes) |
A set of structs and functions to work with byte sequences. lib-ruby-parser
takes a sequence of Bytes
as an input. Also some AST nodes that accept non-UTF-8 byte sequence also store Bytes
.
void LIB_RUBY_PARSER_drop_byte_list | ( | LIB_RUBY_PARSER_ByteList * | byte_list | ) |
ByteList 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_bytes | ( | LIB_RUBY_PARSER_Bytes * | bytes | ) |
Bytes destructor. Just like Rust/C++ destructor it performs cleanup of "embedded" resources. i.e. it doesn't call free
on a given pointer.
LIB_RUBY_PARSER_ByteList LIB_RUBY_PARSER_new_bytes_from_cstr | ( | const char * | s, |
size_t | len | ||
) |
Construts ByteList from a constant C stirng. Copies the data, useful for testing.
LIB_RUBY_PARSER_ByteList LIB_RUBY_PARSER_new_bytes_owned | ( | char * | s, |
size_t | len | ||
) |
Constructs ByteList from ptr+length. Takes ownership, zero-copy.