From 6fb388e6629f95bb70c6d90ab959fc0425ffbca7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 12 Jul 2014 11:08:30 +0530 Subject: [PATCH] Fix integer type conversions --- src/calibre/utils/icu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/utils/icu.c b/src/calibre/utils/icu.c index 9ce1a15bdc..b95ba4f1ff 100644 --- a/src/calibre/utils/icu.c +++ b/src/calibre/utils/icu.c @@ -636,7 +636,7 @@ icu_BreakIterator_index(icu_BreakIterator *self, PyObject *args, PyObject *kwarg end: free(buf); - return Py_BuildValue("l", (long int)ans); + return Py_BuildValue("l", (long)ans); } // }}} @@ -685,7 +685,7 @@ icu_BreakIterator_split2(icu_BreakIterator *self, PyObject *args, PyObject *kwar PyTuple_SET_ITEM(temp, 1, t); } else { last_sz = sz; - temp = Py_BuildValue("II", (unsigned int)prev, (unsigned int)sz); + temp = Py_BuildValue("ll", (long)prev, (long)sz); if (temp == NULL) { Py_DECREF(ans); ans = NULL; break; }