Return non-const string from ts_node_string

The caller should free the string.
This commit is contained in:
Max Brunsfeld 2016-01-18 10:27:23 -08:00
parent 87316f22f3
commit 9d0835edbf
2 changed files with 2 additions and 2 deletions

View file

@ -206,7 +206,7 @@ const char *ts_node_name(TSNode self, const TSDocument *document) {
return document->parser.language->symbol_names[ts_node__tree(self)->symbol];
}
const char *ts_node_string(TSNode self, const TSDocument *document) {
char *ts_node_string(TSNode self, const TSDocument *document) {
return ts_tree_string(ts_node__tree(self),
document->parser.language->symbol_names, false);
}