From 77626967d61efb1f5bc4085cb1dba7cf563ae77e Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 10 Apr 2001 21:35:31 +0000 Subject: [PATCH] unique sig, import [SVN r9754] --- include/boost/python/cross_module.hpp | 54 +++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/include/boost/python/cross_module.hpp b/include/boost/python/cross_module.hpp index 42f97d2d..538f43dd 100644 --- a/include/boost/python/cross_module.hpp +++ b/include/boost/python/cross_module.hpp @@ -40,7 +40,7 @@ class python_import_extension_class_converters { public: - friend python_import_extension_class_converters py_extension_class_converters(boost::python::type) + friend python_import_extension_class_converters py_extension_class_converters(boost::python::type, bool sig = false) { return python_import_extension_class_converters(); } @@ -50,65 +50,65 @@ class python_import_extension_class_converters return boost::python::detail::import_extension_class::get_converters()->to_python(x); } - friend T* from_python(PyObject* p, boost::python::type) + friend T* from_python(PyObject* p, boost::python::type, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->T_pointer_from_python(p); } // Convert to const T* - friend const T* from_python(PyObject* p, boost::python::type) + friend const T* from_python(PyObject* p, boost::python::type, bool sig = false) { return from_python(p, boost::python::type()); } // Convert to const T* const& - friend const T* from_python(PyObject* p, boost::python::type) + friend const T* from_python(PyObject* p, boost::python::type, bool sig = false) { return from_python(p, boost::python::type()); } // Convert to T* const& - friend T* from_python(PyObject* p, boost::python::type) + friend T* from_python(PyObject* p, boost::python::type, bool sig = false) { return from_python(p, boost::python::type()); } // Convert to T& - friend T& from_python(PyObject* p, boost::python::type) { + friend T& from_python(PyObject* p, boost::python::type, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->T_reference_from_python(p); } // Convert to const T& - friend const T& from_python(PyObject* p, boost::python::type) + friend const T& from_python(PyObject* p, boost::python::type, bool sig = false) { return from_python(p, boost::python::type()); } // Convert to T - friend const T& from_python(PyObject* p, boost::python::type) + friend const T& from_python(PyObject* p, boost::python::type, bool sig = false) { return from_python(p, boost::python::type()); } - friend std::auto_ptr& from_python(PyObject* p, boost::python::type&>) { + friend std::auto_ptr& from_python(PyObject* p, boost::python::type&>, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->auto_ptr_reference_from_python(p); } - friend std::auto_ptr from_python(PyObject* p, boost::python::type >) { + friend std::auto_ptr from_python(PyObject* p, boost::python::type >, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->auto_ptr_from_python(p); } - friend const std::auto_ptr& from_python(PyObject* p, boost::python::type&>) { + friend const std::auto_ptr& from_python(PyObject* p, boost::python::type&>, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->const_auto_ptr_reference_from_python(p); } - friend PyObject* to_python(std::auto_ptr x) { + friend PyObject* to_python(std::auto_ptr x, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->to_python(x); } - friend boost::shared_ptr& from_python(PyObject* p, boost::python::type&>) { + friend boost::shared_ptr& from_python(PyObject* p, boost::python::type&>, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->shared_ptr_reference_from_python(p); } - friend const boost::shared_ptr& from_python(PyObject* p, boost::python::type >) { + friend const boost::shared_ptr& from_python(PyObject* p, boost::python::type >, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->shared_ptr_from_python(p); } - friend const boost::shared_ptr& from_python(PyObject* p, boost::python::type&>) { + friend const boost::shared_ptr& from_python(PyObject* p, boost::python::type&>, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->const_shared_ptr_reference_from_python(p); } - friend PyObject* to_python(boost::shared_ptr x) { + friend PyObject* to_python(boost::shared_ptr x, bool sig = false) { return boost::python::detail::import_extension_class::get_converters()->to_python(x); } }; @@ -152,34 +152,34 @@ struct export_converter_object_noncopyable : export_converter_object_base throw import_error(); } virtual PyObject* to_python(std::auto_ptr x) { - return BOOST_PYTHON_CONVERSION::to_python(x, true); + return BOOST_PYTHON_CONVERSION::to_python(x); } virtual PyObject* to_python(boost::shared_ptr x) { - return BOOST_PYTHON_CONVERSION::to_python(x, true); + return BOOST_PYTHON_CONVERSION::to_python(x); } virtual T* T_pointer_from_python(PyObject* obj) { - return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type(), true); + return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type()); } virtual T& T_reference_from_python(PyObject* obj) { - return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type(), true); + return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type()); } virtual std::auto_ptr& auto_ptr_reference_from_python(PyObject* obj) { - return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type&>(), true); + return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type&>()); } virtual std::auto_ptr auto_ptr_from_python(PyObject* obj) { - return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type >(), true); + return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type >()); } virtual const std::auto_ptr& const_auto_ptr_reference_from_python(PyObject* obj) { - return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type&>(), true); + return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type&>()); } virtual boost::shared_ptr& shared_ptr_reference_from_python(PyObject* obj) { - return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type&>(), true); + return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type&>()); } virtual const boost::shared_ptr& shared_ptr_from_python(PyObject* obj) { - return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type >(), true); + return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type >()); } virtual const boost::shared_ptr& const_shared_ptr_reference_from_python(PyObject* obj) { - return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type&>(), true); + return BOOST_PYTHON_CONVERSION::from_python(obj, boost::python::type&>()); } }; @@ -188,7 +188,7 @@ template struct export_converter_object : export_converter_object_noncopyable { virtual PyObject* to_python(const T& x) { - return BOOST_PYTHON_CONVERSION::py_extension_class_converters(boost::python::type(), true).to_python(x); + return BOOST_PYTHON_CONVERSION::py_extension_class_converters(boost::python::type()).to_python(x); } };