UIMA-2433 fix declaration of len
git-svn-id: https://svn.apache.org/repos/asf/uima/uimacpp/trunk@1361052 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scriptators/uima.i b/scriptators/uima.i
index 1d78bb3..5cc2b23 100644
--- a/scriptators/uima.i
+++ b/scriptators/uima.i
@@ -67,13 +67,14 @@
// convert using default codepage
static bool PyStringConvert(PyObject *obj, UnicodeString &rv) {
char *src;
- int len;
#ifdef PY_VERSION_HEX
#if (PY_VERSION_HEX >= 0x02050000)
/* Python version was greater than 2.5 */
+ Py_ssize_t len;
PyString_AsStringAndSize(obj, &src, ( Py_ssize_t*)&len);
#else
/* Python version was less than 2.5 */
+ int len;
PyString_AsStringAndSize(obj, &src, &len);
#endif
#else