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

@ -10,8 +10,11 @@ static const HParserVtable nothing_vt = {
.parse = parse_nothing,
};
const HParser* h_nothing_p() {
HParser *ret = g_new(HParser, 1);
const HParser* h_nothing_p() {
return h_nothing_p__m(&system_allocator);
}
const HParser* h_nothing_p__m(HAllocator* mm__) {
HParser *ret = h_new(HParser, 1);
ret->vtable = &nothing_vt; ret->env = NULL;
return (const HParser*)ret;
}