From 6dc5ef02b5ace39d147ecb198fd21c05898766cf Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 20 Mar 2001 14:49:26 +0000 Subject: [PATCH] BOOST_PYTHON_TRU64_CXX_PROBLEM define [SVN r9613] --- build/tru64_cxx.mak | 12 +++++------- include/boost/python/cross_module.hpp | 28 +++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/build/tru64_cxx.mak b/build/tru64_cxx.mak index 6f4baea6..57f79345 100644 --- a/build/tru64_cxx.mak +++ b/build/tru64_cxx.mak @@ -17,17 +17,17 @@ PYINC= -I/usr/local/Python-1.5.2/include/python1.5 #PYEXE= /usr/local/Python-2.0/bin/python #PYINC= -I/usr/local/Python-2.0/include/python2.0 #STLPORTINC= -I/usr/local/STLport-4.1b3/stlport +#STLPORTINC= -I/usr/local/STLport-4.1b4/stlport +#STLPORTINC= -I/net/anaconda/scratch1/rwgk/STLport-4.1b5/stlport #STLPORTOPTS= \ # -D__USE_STD_IOSTREAM \ # -D__STL_NO_SGI_IOSTREAMS \ # -D__STL_USE_NATIVE_STRING \ # -D__STL_NO_NEW_C_HEADERS \ # -D_RWSTD_COMPILE_INSTANTIATE=1 -#STLPORTINC= -I/usr/local/STLport-4.1b4/stlport -#STLPORTOPTS= -D__NO_USE_STD_IOSTREAM -D__STL_NO_SGI_IOSTREAMS STLPORTINC= -I/net/cci/xp/C++_C_headers -STDOPTS= -std strict_ansi +STDOPTS= -std strict_ansi -DBOOST_PYTHON_TRU64_CXX_PROBLEM WARNOPTS= -msg_disable 186,450,1115 # use -msg_display_number to obtain integer tags for -msg_disable @@ -61,10 +61,8 @@ all: libboost_python.a \ getting_started1.so getting_started2.so getting_started3.so \ getting_started4.so getting_started5.so \ pickle1.so pickle2.so pickle3.so \ - noncopyable_export.so - -# noncopyable_import.so \ -# ivect.so dvect.so + noncopyable_export.so noncopyable_import.so \ + ivect.so dvect.so libboost_python.a: $(OBJ) rm -f libboost_python.a diff --git a/include/boost/python/cross_module.hpp b/include/boost/python/cross_module.hpp index a6c32889..47ca9225 100644 --- a/include/boost/python/cross_module.hpp +++ b/include/boost/python/cross_module.hpp @@ -85,11 +85,21 @@ class python_import_extension_class_converters } friend std::auto_ptr& from_python(PyObject* p, boost::python::type >) { - return boost::python::detail::import_extension_class::get_converters()->auto_ptr_value_from_python(p); +#ifdef BOOST_PYTHON_TRU64_CXX_PROBLEM + PyErr_SetString(PyExc_RuntimeError, "not implemented"); + throw import_error(); +#else + return boost::python::detail::import_extension_class::get_converters()->auto_ptr_value_from_python(p); // XXX tru64_cxx: no suitable copy constructor +#endif } friend const std::auto_ptr& from_python(PyObject* p, boost::python::type&>) { - return boost::python::detail::import_extension_class::get_converters()->auto_ptr_value_from_python(p); +#ifdef BOOST_PYTHON_TRU64_CXX_PROBLEM + PyErr_SetString(PyExc_RuntimeError, "not implemented"); + throw import_error(); +#else + return boost::python::detail::import_extension_class::get_converters()->auto_ptr_value_from_python(p); // XXX tru64_cxx: no suitable copy constructor +#endif } friend PyObject* to_python(std::auto_ptr x) { @@ -101,11 +111,21 @@ class python_import_extension_class_converters } friend boost::shared_ptr& from_python(PyObject* p, boost::python::type >) { - return boost::python::detail::import_extension_class::get_converters()->shared_ptr_value_from_python(p); +#ifdef BOOST_PYTHON_TRU64_CXX_PROBLEM + PyErr_SetString(PyExc_RuntimeError, "not implemented"); + throw import_error(); +#else + return boost::python::detail::import_extension_class::get_converters()->shared_ptr_value_from_python(p); // XXX tru64_cxx: initial value of reference to non-const must be an lvalue +#endif } friend const boost::shared_ptr& from_python(PyObject* p, boost::python::type&>) { - return boost::python::detail::import_extension_class::get_converters()->shared_ptr_value_from_python(p); +#ifdef BOOST_PYTHON_TRU64_CXX_PROBLEM + PyErr_SetString(PyExc_RuntimeError, "not implemented"); + throw import_error(); +#else + return boost::python::detail::import_extension_class::get_converters()->shared_ptr_value_from_python(p); // XXX tru64_cxx: returning reference to local temporary +#endif } friend PyObject* to_python(boost::shared_ptr x) {