mirror of
https://github.com/rkd77/elinks.git
synced 2024-10-17 06:24:12 -04:00
[python] fragment->length is not int
rpi does not like it
This commit is contained in:
parent
fa736be0ce
commit
15362c8980
@ -161,7 +161,7 @@ script_hook_pre_format_html(va_list ap, void *data)
|
|||||||
if (!is_cp_utf8(codepage)) {
|
if (!is_cp_utf8(codepage)) {
|
||||||
int width;
|
int width;
|
||||||
struct conv_table *ctable = get_translation_table(codepage, utf8_cp);
|
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);
|
&width, NULL, NULL);
|
||||||
|
|
||||||
if (!utf8_data) {
|
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);
|
result = PyObject_CallMethod(python_hooks, method, "ss#", url, utf8_data, width);
|
||||||
mem_free(utf8_data);
|
mem_free(utf8_data);
|
||||||
} else {
|
} 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;
|
if (!result) goto error;
|
||||||
@ -188,7 +188,7 @@ script_hook_pre_format_html(va_list ap, void *data)
|
|||||||
if (!is_cp_utf8(codepage)) {
|
if (!is_cp_utf8(codepage)) {
|
||||||
int width;
|
int width;
|
||||||
struct conv_table *ctable = get_translation_table(utf8_cp, codepage);
|
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);
|
&width, NULL, NULL);
|
||||||
|
|
||||||
if (!dec_data) {
|
if (!dec_data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user