summaryrefslogtreecommitdiff
path: root/content/handlers/css/css.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-05-05 22:46:40 +0100
committerVincent Sanders <vince@kyllikki.org>2019-05-05 22:50:25 +0100
commit35bc2ccbb89a6b499e0e3b6f7095afea214f0c59 (patch)
treecd494ae1e33ab55d0e644d11eb973ddde4decbb6 /content/handlers/css/css.c
parentf966580d22d47ab97bceb2f067fc2b9402af01b7 (diff)
downloadnetsurf-35bc2ccbb89a6b499e0e3b6f7095afea214f0c59.tar.gz
netsurf-35bc2ccbb89a6b499e0e3b6f7095afea214f0c59.tar.bz2
change content get_source_data interfaces to return uint8_t and size_t
previously these interfaces returned char * and unsigned int which was undesirable.
Diffstat (limited to 'content/handlers/css/css.c')
-rw-r--r--content/handlers/css/css.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/content/handlers/css/css.c b/content/handlers/css/css.c
index dda044d15..0dcbe9907 100644
--- a/content/handlers/css/css.c
+++ b/content/handlers/css/css.c
@@ -80,8 +80,6 @@ typedef struct {
* imports array */
} nscss_import_ctx;
-static bool nscss_process_data(struct content *c, const char *data,
- unsigned int size);
static bool nscss_convert(struct content *c);
static void nscss_destroy(struct content *c);
static nserror nscss_clone(const struct content *old, struct content **newc);
@@ -245,7 +243,8 @@ static nserror nscss_create_css_data(struct content_css_data *c,
* \param size Number of bytes to process
* \return true on success, false on failure
*/
-bool nscss_process_data(struct content *c, const char *data, unsigned int size)
+static bool
+nscss_process_data(struct content *c, const char *data, unsigned int size)
{
nscss_content *css = (nscss_content *) c;
css_error error;
@@ -374,8 +373,8 @@ nserror nscss_clone(const struct content *old, struct content **newc)
{
const nscss_content *old_css = (const nscss_content *) old;
nscss_content *new_css;
- const char *data;
- unsigned long size;
+ const uint8_t *data;
+ size_t size;
nserror error;
new_css = calloc(1, sizeof(nscss_content));
@@ -402,7 +401,9 @@ nserror nscss_clone(const struct content *old, struct content **newc)
data = content__get_source_data(&new_css->base, &size);
if (size > 0) {
- if (nscss_process_data(&new_css->base, data, size) == false) {
+ if (nscss_process_data(&new_css->base,
+ (char *)data,
+ (unsigned int)size) == false) {
content_destroy(&new_css->base);
return NSERROR_CLONE_FAILED;
}