Replaced glib memory allocation
This commit is contained in:
parent
6101b8c43a
commit
d5729efa1f
33 changed files with 414 additions and 166 deletions
|
|
@ -16,9 +16,12 @@ static const HParserVtable optional_vt = {
|
|||
};
|
||||
|
||||
const HParser* h_optional(const HParser* p) {
|
||||
return h_optional__m(&system_allocator, p);
|
||||
}
|
||||
const HParser* h_optional__m(HAllocator* mm__, const HParser* p) {
|
||||
// TODO: re-add this
|
||||
//assert_message(p->vtable != &ignore_vt, "Thou shalt ignore an option, rather than the other way 'round.");
|
||||
HParser *ret = g_new(HParser, 1);
|
||||
HParser *ret = h_new(HParser, 1);
|
||||
ret->vtable = &optional_vt;
|
||||
ret->env = (void*)p;
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue