Introduce language ref-count management C APIs, remove Copy impl for Language in Rust

This commit is contained in:
Max Brunsfeld 2023-11-27 15:50:08 -08:00
parent 660481dbf7
commit da16cb1459
27 changed files with 363 additions and 314 deletions

View file

@ -1013,6 +1013,17 @@ void ts_query_cursor_set_max_start_depth(TSQueryCursor *self, uint32_t max_start
/* Section - Language */
/**********************/
/**
* Get another reference to the given language.
*/
const TSLanguage *ts_language_copy(const TSLanguage *self);
/**
* Free any dynamically-allocated resources for this language, if
* this is the last reference.
*/
void ts_language_delete(const TSLanguage *self);
/**
* Get the number of distinct node types in the language.
*/