diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-05-05 22:46:40 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-05-05 22:50:25 +0100 |
commit | 35bc2ccbb89a6b499e0e3b6f7095afea214f0c59 (patch) | |
tree | cd494ae1e33ab55d0e644d11eb973ddde4decbb6 /content/handlers/image/svg.c | |
parent | f966580d22d47ab97bceb2f067fc2b9402af01b7 (diff) | |
download | netsurf-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/image/svg.c')
-rw-r--r-- | content/handlers/image/svg.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/content/handlers/image/svg.c b/content/handlers/image/svg.c index 99722495f..3f4e00c89 100644 --- a/content/handlers/image/svg.c +++ b/content/handlers/image/svg.c @@ -126,8 +126,8 @@ static bool svg_convert(struct content *c) static void svg_reformat(struct content *c, int width, int height) { svg_content *svg = (svg_content *) c; - const char *source_data; - unsigned long source_size; + const uint8_t *source_data; + size_t source_size; assert(svg->diagram); @@ -135,9 +135,12 @@ static void svg_reformat(struct content *c, int width, int height) if (width != svg->current_width || height != svg->current_height) { source_data = content__get_source_data(c, &source_size); - svgtiny_parse(svg->diagram, source_data, source_size, - nsurl_access(content_get_url(c)), - width, height); + svgtiny_parse(svg->diagram, + (const char *)source_data, + source_size, + nsurl_access(content_get_url(c)), + width, + height); svg->current_width = width; svg->current_height = height; @@ -222,7 +225,7 @@ svg_redraw_internal(struct content *c, return false; } } - } + } #undef BGR @@ -361,5 +364,3 @@ static const char *svg_types[] = { CONTENT_FACTORY_REGISTER_TYPES(svg, svg_types, svg_content_handler); - - |