Fixed a potential segfault; hand-initialized HParsers in h_choice and
h_sequence need PB_MIN set. Conflicts: src/bindings/python/SConscript src/bindings/python/hammer_tests.py
This commit is contained in:
parent
b6098075c7
commit
b4e28ac021
2 changed files with 9 additions and 5 deletions
|
|
@ -143,6 +143,8 @@ HParser* h_choice__ma(HAllocator* mm__, void *args[]) {
|
|||
|
||||
s->len = len;
|
||||
HParser *ret = h_new(HParser, 1);
|
||||
ret->vtable = &choice_vt; ret->env = (void*)s;
|
||||
ret->vtable = &choice_vt;
|
||||
ret->env = (void*)s;
|
||||
ret->backend = PB_MIN;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,6 +159,8 @@ HParser* h_sequence__ma(HAllocator* mm__, void *args[]) {
|
|||
|
||||
s->len = len;
|
||||
HParser *ret = h_new(HParser, 1);
|
||||
ret->vtable = &sequence_vt; ret->env = (void*)s;
|
||||
ret->vtable = &sequence_vt;
|
||||
ret->env = (void*)s;
|
||||
ret->backend = PB_MIN;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue