[C++-sig] builtin_converters.hpp using outdated API on win64 builds
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Thu Dec 23 12:49:49 CET 2010
----- Original Message ----
> I'm currently trying to build boost-1.45 against python-3.1.3 on win64
> (visual studio 2009 sp1). This build is failing because
> boost/python/converter/builtin_converters.hpp is using APIs that have
> been removed from python3 without checking the python version; at
> lines 138 and 144 PyInt_FromLong is being used.
>
> If I understand what's going in that code, the fix is to update line
> 125 to check the python version. I think we can just add:
>
> && PY_VERSION_HEX < 0x03000000
>
> to the preprocessor conditional.
>
> I've made this change locally, and it seems to fix things. Does this
> seem like the correct fix?
Did you test what happens when you have a function returning a size_t?
E.g.
std::size_t dummy() { return 123; }
def("dummy", dummy);
In Python3, what is the Python type you get?
In Python2 it is 123L without the special code for WIN64.
Ralf
More information about the Cplusplus-sig
mailing list