From 15362c89806f70d9c8f26cadb44481a8274b6f93 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Wed, 25 Jan 2023 19:21:59 +0100 Subject: [PATCH] [python] fragment->length is not int rpi does not like it --- src/scripting/python/hooks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripting/python/hooks.c b/src/scripting/python/hooks.c index 44e62266..41c4787e 100644 --- a/src/scripting/python/hooks.c +++ b/src/scripting/python/hooks.c @@ -161,7 +161,7 @@ script_hook_pre_format_html(va_list ap, void *data) if (!is_cp_utf8(codepage)) { int width; struct conv_table *ctable = get_translation_table(codepage, utf8_cp); - char *utf8_data = convert_string(ctable, fragment->data, fragment->length, utf8_cp, CSM_NONE, + char *utf8_data = convert_string(ctable, fragment->data, (int)fragment->length, utf8_cp, CSM_NONE, &width, NULL, NULL); if (!utf8_data) { @@ -170,7 +170,7 @@ script_hook_pre_format_html(va_list ap, void *data) result = PyObject_CallMethod(python_hooks, method, "ss#", url, utf8_data, width); mem_free(utf8_data); } else { - result = PyObject_CallMethod(python_hooks, method, "ss#", url, fragment->data, fragment->length); + result = PyObject_CallMethod(python_hooks, method, "ss#", url, fragment->data, (int)fragment->length); } if (!result) goto error; @@ -188,7 +188,7 @@ script_hook_pre_format_html(va_list ap, void *data) if (!is_cp_utf8(codepage)) { int width; struct conv_table *ctable = get_translation_table(utf8_cp, codepage); - char *dec_data = convert_string(ctable, str, len, codepage, CSM_NONE, + char *dec_data = convert_string(ctable, str, (int)len, codepage, CSM_NONE, &width, NULL, NULL); if (!dec_data) {