[PyQt] PyKDE4 build error - int/Py_ssize_t conversions

Martin Böhm martin.bohm at kubuntu.org
Tue Sep 4 12:42:54 BST 2007


Hello list,

there are some trouble with compiling the latest and greatest PyKDE4
(from KDE's on a 64bit machine, with Python 2.5.1.

Namely it starts like this:

sip/kdecore/kurl.sip: In function 'PyObject*
slot_KUrl_List___getitem__(PyObject*, PyObject*)':
sip/kdecore/kurl.sip:167: error: cannot convert 'int*' to
'Py_ssize_t*' for argument '3' to 'int
PySlice_GetIndicesEx(PySliceObject*, Py_ssize_t, Py_ssize_t*,
Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)'
sip/kdecore/kurl.sip: In function 'int
slot_KUrl_List___delitem__(PyObject*, PyObject*)':
sip/kdecore/kurl.sip:135: error: cannot convert 'int*' to
'Py_ssize_t*' for argument '3' to 'int
PySlice_GetIndicesEx(PySliceObject*, Py_ssize_t, Py_ssize_t*,
Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)'
sip/kdecore/kurl.sip: In function 'int
slot_KUrl_List___setitem__(PyObject*, PyObject*)':
sip/kdecore/kurl.sip:93: error: cannot convert 'int*' to 'Py_ssize_t*'
for argument '3' to 'int PySlice_GetIndicesEx(PySliceObject*,
Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)'

Google search found out that this error was fixed in the past by
replacing some "int" definitions into "SIP_SSIZE_T". I've tried
replacing them with "ssize_t" and it indeed continued compiling. Some
more of similar errors are deeper down.

Simon told me on IRC that it might be useful to post it here, which I am doing.

PS: Thanks to everyone for their work on (and with) pyqt and pykde!

Martin Böhm



More information about the PyQt mailing list