Ticket #4239: python.diff

File python.diff, 3.0 KB (added by Sohail Somani, 12 years ago)
  • vendor/boost/boost/python/detail/wrap_python.hpp

    diff -r 4b7e3d45ba4a vendor/boost/boost/python/detail/wrap_python.hpp
    a b  
    7070#endif
    7171
    7272//
     73// Latest versions of OSX ship Python as a framework
     74//
     75#if defined(__APPLE__)
     76#  define BOOST_OSX_INCLUDE_PYTHON_AS_FRAMEWORK
     77#endif
     78//
     79
     80//
    7381// Get ahold of Python's version number
    7482//
     83#if defined(BOOST_OSX_INCLUDE_PYTHON_AS_FRAMEWORK)
     84# include <Python/patchlevel.h>
     85#else
    7586#include <patchlevel.h>
     87#endif
    7688
    7789#if PY_MAJOR_VERSION<2 || PY_MAJOR_VERSION==2 && PY_MINOR_VERSION<2
    7890#error Python 2.2 or higher is required for this version of Boost.Python.
     
    138150
    139151#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION == 2 && PY_MICRO_VERSION < 2
    140152# include <boost/python/detail/python22_fixed.h>
     153#elif defined(BOOST_OSX_INCLUDE_PYTHON_AS_FRAMEWORK)
     154# include <Python/Python.h>
    141155#else
    142156# include <Python.h>
    143157#endif
  • vendor/boost/libs/python/src/converter/from_python.cpp

    diff -r 4b7e3d45ba4a vendor/boost/libs/python/src/converter/from_python.cpp
    a b  
    4040    , registration const& converters)
    4141{
    4242    rvalue_from_python_stage1_data data;
     43    data.construct = 0;
    4344
    4445    // First check to see if it's embedded in an extension class
    4546    // instance, as a special case.
  • vendor/boost/libs/python/src/object/class.cpp

    diff -r 4b7e3d45ba4a vendor/boost/libs/python/src/object/class.cpp
    a b  
    55
    66#include <boost/python/detail/prefix.hpp>
    77#include <boost/mpl/lambda.hpp> // #including this first is an intel6 workaround
     8#include <boost/python/detail/wrap_python.hpp>
    89
    910#include <boost/python/object/class.hpp>
    1011#include <boost/python/object/instance.hpp>
     
    2526#include <vector>
    2627#include <cstddef>
    2728#include <new>
     29
     30#ifdef BOOST_OSX_INCLUDE_PYTHON_AS_FRAMEWORK
     31#  include <Python/structmember.h>
     32#else
    2833#include <structmember.h>
     34#endif
    2935
    3036namespace boost { namespace python {
    3137
  • vendor/boost/libs/python/src/object/enum.cpp

    diff -r 4b7e3d45ba4a vendor/boost/libs/python/src/object/enum.cpp
    a b  
    33// accompanying file LICENSE_1_0.txt or copy at
    44// http://www.boost.org/LICENSE_1_0.txt)
    55
     6#include <boost/python/detail/wrap_python.hpp>
    67#include <boost/python/object/enum_base.hpp>
    78#include <boost/python/cast.hpp>
    89#include <boost/python/scope.hpp>
     
    1213#include <boost/python/str.hpp>
    1314#include <boost/python/extract.hpp>
    1415#include <boost/python/object_protocol.hpp>
     16
     17#if defined(BOOST_OSX_INCLUDE_PYTHON_AS_FRAMEWORK)
     18#  include <Python/structmember.h>
     19#else
    1520#include <structmember.h>
     21#endif
    1622
    1723namespace boost { namespace python { namespace objects {
    1824