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) {