grammar : fix unnecessarily retained pointer to rules (#6003)

This commit is contained in:
gliptic 2024-03-11 20:59:03 +01:00 committed by GitHub
parent 44ca159faf
commit 5cdb371731
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10538,7 +10538,7 @@ struct llama_grammar * llama_grammar_init(
// loop over alternates of start rule to build initial stacks
std::vector<std::vector<const llama_grammar_element *>> stacks;
pos = rules[start_rule_index];
pos = vec_rules[start_rule_index].data();
do {
std::vector<const llama_grammar_element *> stack;
if (!llama_grammar_is_end_of_sequence(pos)) {