Replaced glib memory allocation

This commit is contained in:
Dan Hirsch 2012-10-10 15:58:03 +02:00
parent 6101b8c43a
commit d5729efa1f
33 changed files with 414 additions and 166 deletions

View file

@ -13,9 +13,13 @@ static const HParserVtable and_vt = {
.parse = parse_and,
};
const HParser* h_and(const HParser* p) {
return h_and__m(&system_allocator, p);
}
const HParser* h_and__m(HAllocator* mm__, const HParser* p) {
// zero-width postive lookahead
HParser *res = g_new(HParser, 1);
HParser *res = h_new(HParser, 1);
res->env = (void*)p;
res->vtable = &and_vt;
return res;