summaryrefslogtreecommitdiff
path: root/src/select/properties/quotes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/properties/quotes.c')
-rw-r--r--src/select/properties/quotes.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/select/properties/quotes.c b/src/select/properties/quotes.c
index 7671c1d..2dd6af4 100644
--- a/src/select/properties/quotes.c
+++ b/src/select/properties/quotes.c
@@ -30,19 +30,21 @@ css_error css__cascade_quotes(uint32_t opv, css_style *style,
lwc_string *open, *close;
lwc_string **temp;
- css__stylesheet_string_get(style->sheet, *((css_code_t *) style->bytecode), &open);
+ css__stylesheet_string_get(style->sheet,
+ *((css_code_t *) style->bytecode),
+ &open);
advance_bytecode(style, sizeof(css_code_t));
- css__stylesheet_string_get(style->sheet, *((css_code_t *) style->bytecode), &close);
+ css__stylesheet_string_get(style->sheet,
+ *((css_code_t *) style->bytecode),
+ &close);
advance_bytecode(style, sizeof(css_code_t));
- temp = state->computed->alloc(quotes,
- (n_quotes + 2) * sizeof(lwc_string *),
- state->computed->pw);
+ temp = realloc(quotes,
+ (n_quotes + 2) * sizeof(lwc_string *));
if (temp == NULL) {
if (quotes != NULL) {
- state->computed->alloc(quotes, 0,
- state->computed->pw);
+ free(quotes);
}
return CSS_NOMEM;
}
@@ -61,11 +63,9 @@ css_error css__cascade_quotes(uint32_t opv, css_style *style,
if (n_quotes > 0) {
lwc_string **temp;
- temp = state->computed->alloc(quotes,
- (n_quotes + 1) * sizeof(lwc_string *),
- state->computed->pw);
+ temp = realloc(quotes, (n_quotes + 1) * sizeof(lwc_string *));
if (temp == NULL) {
- state->computed->alloc(quotes, 0, state->computed->pw);
+ free(quotes);
return CSS_NOMEM;
}
@@ -80,12 +80,12 @@ css_error css__cascade_quotes(uint32_t opv, css_style *style,
error = set_quotes(state->computed, value, quotes);
if (error != CSS_OK && quotes != NULL)
- state->computed->alloc(quotes, 0, state->computed->pw);
+ free(quotes);
return error;
} else {
if (quotes != NULL)
- state->computed->alloc(quotes, 0, state->computed->pw);
+ free(quotes);
}
return CSS_OK;
@@ -105,7 +105,7 @@ css_error css__set_quotes_from_hint(const css_hint *hint,
}
if (error != CSS_OK && hint->data.strings != NULL)
- style->alloc(hint->data.strings, 0, style->pw);
+ free(hint->data.strings);
return error;
}
@@ -145,9 +145,7 @@ css_error css__compose_quotes(const css_computed_style *parent,
for (i = quotes; (*i) != NULL; i++)
n_quotes++;
- copy = result->alloc(NULL, (n_quotes + 1) *
- sizeof(lwc_string *),
- result->pw);
+ copy = malloc((n_quotes + 1) * sizeof(lwc_string *));
if (copy == NULL)
return CSS_NOMEM;
@@ -157,7 +155,7 @@ css_error css__compose_quotes(const css_computed_style *parent,
error = set_quotes(result, type, copy);
if (error != CSS_OK && copy != NULL)
- result->alloc(copy, 0, result->pw);
+ free(copy);
return error;
}