[texworks] compilation of TWPythonPlugin.cpp failed

Jonathan Kew jfkthame at googlemail.com
Mon Feb 22 01:13:59 CET 2010

I think this is an issue with the version of Python. We need an #if... in the source that checks the version of the Python headers, to choose the right type for that variable, but I'm not sure exactly what version number to test.

If someone could check the declaration of PyDict_Next() through various releases of Python 2.x, it should be easy enough to figure out what's needed. Or perhaps it's even mentioned in release notes or changelog somewhere.


On 21 Feb 2010, at 16:08, Atsuhito Kohda wrote:

> Hi all,
> On an amd64 machine (Debian/sid), if I try to compile TWPythonPlugin
> it fails as follows:
> | g++ -c -pipe -fno-strict-aliasing -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../../src -I/usr/include/python2.6 -Imoc -o obj/TWPythonPlugin.o TWPythonPlugin.cpp
> | TWPythonPlugin.cpp:317: warning: unused parameter 'kw'
> | TWPythonPlugin.cpp: In static member function 'static QVariant PythonScript::PythonToVariant(PyObject*)':
> | TWPythonPlugin.cpp:458: error: cannot convert 'int*' to 'Py_ssize_t*' for argument '2' to 'int PyDict_Next(PyObject*, Py_ssize_t*, PyObject**, PyObject**)'
> | make[1]: *** [obj/TWPythonPlugin.o] Error 1
> It works fine on 32-bits machines but seems to fail on 64-bits
> machines.  I use TW svn569 version.
> Is it possible to compile TWPythonPlugin on a 64-bits machine?
> Thanks in advance.
> Best regards,			2010-2-22(Mon)
> -- 
> Debian Developer - much more I18N of Debian
> Atsuhito Kohda <kohda AT debian.org>
> Department of Math., Univ. of Tokushima

More information about the texworks mailing list