From 35bc2ccbb89a6b499e0e3b6f7095afea214f0c59 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 5 May 2019 22:46:40 +0100 Subject: change content get_source_data interfaces to return uint8_t and size_t previously these interfaces returned char * and unsigned int which was undesirable. --- content/handlers/image/svg.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'content/handlers/image/svg.c') 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); - - -- cgit v1.2.3