From e38bc7cbcecc62e206ca9354cb09aa8beab21d89 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 14 Nov 2001 17:26:11 +0000 Subject: [PATCH] Pro7 compatibility [SVN r11677] --- include/boost/python/cross_module.hpp | 3 +++ include/boost/python/detail/extension_class.hpp | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/include/boost/python/cross_module.hpp b/include/boost/python/cross_module.hpp index 7c1fe507..dd1c47d2 100644 --- a/include/boost/python/cross_module.hpp +++ b/include/boost/python/cross_module.hpp @@ -169,6 +169,9 @@ struct export_converter_object_noncopyable : export_converter_object_base PyErr_SetString(PyExc_RuntimeError, "to_python(const T&) converter not exported"); throw import_error(); +#if defined(__MWERKS__) && __MWERKS__ <= 0x2406 + return 0; +#endif } virtual T* from_python_Ts(PyObject* p, boost::python::type t) { diff --git a/include/boost/python/detail/extension_class.hpp b/include/boost/python/detail/extension_class.hpp index d871ad6e..f7be9afb 100644 --- a/include/boost/python/detail/extension_class.hpp +++ b/include/boost/python/detail/extension_class.hpp @@ -233,6 +233,9 @@ class python_extension_class_converters } boost::python::detail::report_missing_instance_data(self, boost::python::detail::class_registry::class_object(), typeid(T)); throw boost::python::argument_error(); +#if defined(__MWERKS__) && __MWERKS__ <= 0x2406 + return 0; +#endif } // Convert to T* @@ -261,6 +264,9 @@ class python_extension_class_converters } boost::python::detail::report_missing_ptr_data(self, boost::python::detail::class_registry::class_object(), typeid(T)); throw boost::python::argument_error(); +#if defined(__MWERKS__) && __MWERKS__ <= 0x2406 + return *(PtrType*)0; +#endif } // Extract from obj a reference to the PtrType object which is holding a