mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More type conversion fixes
This commit is contained in:
parent
6fb388e662
commit
9f1a5129de
@ -226,7 +226,7 @@ end:
|
||||
if (a != NULL) free(a);
|
||||
if (b != NULL) free(b);
|
||||
|
||||
return (PyErr_Occurred()) ? NULL : Py_BuildValue("ii", pos, length);
|
||||
return (PyErr_Occurred()) ? NULL : Py_BuildValue("ll", (long)pos, (long)length);
|
||||
} // }}}
|
||||
|
||||
// Collator.contains {{{
|
||||
@ -1022,7 +1022,7 @@ icu_string_length(PyObject *self, PyObject *args) {
|
||||
if (icu == NULL) return NULL;
|
||||
sz = u_countChar32(icu, sz);
|
||||
free(icu);
|
||||
return Py_BuildValue("i", sz);
|
||||
return Py_BuildValue("l", (long)sz);
|
||||
} // }}}
|
||||
|
||||
// utf16_length {{{
|
||||
@ -1048,7 +1048,7 @@ icu_utf16_length(PyObject *self, PyObject *args) {
|
||||
}
|
||||
sz = t;
|
||||
#endif
|
||||
return Py_BuildValue("i", sz);
|
||||
return Py_BuildValue("l", (long)sz);
|
||||
} // }}}
|
||||
|
||||
// Module initialization {{{
|
||||
|
Loading…
x
Reference in New Issue
Block a user