summaryrefslogtreecommitdiff
path: root/src/parse/font_face.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-12-13 20:16:52 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-12-13 20:16:52 +0000
commit1b95fec601a3d006ba6b99e1dea3f61c3c8318fc (patch)
tree1a0c3a78afe1db919ff6b4c56a6c3f2e01d03607 /src/parse/font_face.c
parente3372335ec1628e1d6ef1a4fd63b11bb47f2e0e6 (diff)
downloadlibcss-1b95fec601a3d006ba6b99e1dea3f61c3c8318fc.tar.gz
libcss-1b95fec601a3d006ba6b99e1dea3f61c3c8318fc.tar.bz2
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.
Diffstat (limited to 'src/parse/font_face.c')
-rw-r--r--src/parse/font_face.c10
1 files changed, 4 insertions, 6 deletions
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;
}