From 9f1a5129de345b2961eb9b602c879e77da340a3b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 12 Jul 2014 11:11:41 +0530 Subject: [PATCH] More type conversion fixes --- src/calibre/utils/icu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/utils/icu.c b/src/calibre/utils/icu.c index b95ba4f1ff..c6b6564ff3 100644 --- a/src/calibre/utils/icu.c +++ b/src/calibre/utils/icu.c @@ -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 {{{