Boost logo

Boost :

From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2004-08-31 12:45:22


--- Markus_Schöpflin <markus.schoepflin_at_[hidden]> wrote:

> David Abrahams wrote:
>
> > I'm willing to try any change you think is appropriate.
>
> Attached is a patch which fixes the problem on my system. Given the
> complexity of the matter, I can make no promises for other systems. Maybe
> we could check it in and see what happens with the regression tests?
>
> Markus

I just started a local test run after inserting #include <pyconfig.h> at the
beginning of prefix.hpp. It will take a few hours before I have all results.

> > Index: wrap_python.hpp
> ===================================================================
> RCS file: /cvsroot/boost/boost/boost/python/detail/wrap_python.hpp,v
> retrieving revision 1.18
> diff -u -r1.18 wrap_python.hpp
> --- wrap_python.hpp 26 Jul 2004 00:32:07 -0000 1.18
> +++ wrap_python.hpp 31 Aug 2004 15:52:05 -0000
> @@ -21,6 +21,23 @@
> // 01 Mar 01 define PyObject_INIT() for Python 1.x (Dave Abrahams)
>
> //
> +// Get ahold of Python's version number
> +//
> +#include <patchlevel.h>
> +
> +//
> +// Include the python config file. This has to be done before including any
> +// system headers because it defines macros which might collide with default
> +// definitions. Namely these are _OSF_SOURCE, _POSIX_C_SOURCE, and
> +// _XOPEN_SOURCE.
> +//
> +#if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 2
> +# include <config.h>
> +#else
> +# include <pyconfig.h>
> +#endif

Boost.Python Version 2 requires Python 2.2 or greater anyway. I think we should
eliminate this complicated construct.

Ralf

        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk