1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-05 22:00:54 +00:00

[python] fragment->length is not int

rpi does not like it
This commit is contained in:
Witold Filipczyk 2023-01-25 19:21:59 +01:00
parent fa736be0ce
commit 15362c8980

View File

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