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

@ -19,7 +19,10 @@ static const HParserVtable whitespace_vt = {
};
const HParser* h_whitespace(const HParser* p) {
HParser *ret = g_new(HParser, 1);
return h_whitespace__m(&system_allocator, p);
}
const HParser* h_whitespace__m(HAllocator* mm__, const HParser* p) {
HParser *ret = h_new(HParser, 1);
ret->vtable = &whitespace_vt;
ret->env = (void*)p;
return ret;