From 1b95fec601a3d006ba6b99e1dea3f61c3c8318fc Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 13 Dec 2013 20:16:52 +0000 Subject: Various changes which modify API and ABI: - Remove client allocation function. - Change node_classes callback not to yield array ownership to libcss. - Node bloom filters now built by, during selection libcss. - Added selection callbacks to get and set data on document nodes. Test suite, example, and documentation updated to match. --- src/parse/font_face.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/parse/font_face.c') diff --git a/src/parse/font_face.c b/src/parse/font_face.c index 14a715d..8eab006 100644 --- a/src/parse/font_face.c +++ b/src/parse/font_face.c @@ -228,9 +228,8 @@ static css_error font_face_parse_src(css_language *c, /* This will be inefficient if there are a lot of locations - * probably not a problem in practice. */ - new_srcs = c->alloc(srcs, - (n_srcs + 1) * sizeof(css_font_face_src), - c->pw); + new_srcs = realloc(srcs, + (n_srcs + 1) * sizeof(css_font_face_src)); if (new_srcs == NULL) { error = CSS_NOMEM; goto cleanup; @@ -252,7 +251,7 @@ cleanup: if (error != CSS_OK) { *ctx = orig_ctx; if (srcs != NULL) - c->alloc(srcs, 0, c->pw); + free(srcs); } return error; @@ -382,8 +381,7 @@ css_error css__parse_font_descriptor(css_language *c, bool match; if (font_face == NULL) { - error = css__font_face_create(c->sheet->alloc, - c->sheet->pw, &font_face); + error = css__font_face_create(&font_face); if (error != CSS_OK) { return error; } -- cgit v1.2.3