diff --git a/src/gen_extclass.py b/src/gen_extclass.py index 8de8a1ae..57189a7d 100644 --- a/src/gen_extclass.py +++ b/src/gen_extclass.py @@ -15,6 +15,7 @@ def gen_extclass(args): // gen_extclass.python // Revision History: +// 17 Apr 01 Comment added with reference to cross_module.hpp (R.W. Grosse-Kunstleve) // 05 Mar 01 Fixed a bug which prevented auto_ptr values from being converted // to_python (Dave Abrahams) @@ -171,6 +172,14 @@ BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE // and U. T is the class the user really intends to wrap. U is a class derived // from T with some virtual function overriding boilerplate, or if there are no // virtual functions, U = held_instance. +// +// A look-alike of this class in root/boost/python/cross_module.hpp +// is used for the implementation of the cross-module support +// (export_converters and import_converters). If from_python +// and to_python converters are added or removed from the class +// below, the class python_import_extension_class_converters has +// to be modified accordingly. +// template > class python_extension_class_converters { @@ -607,6 +616,12 @@ class extension_class choose_op<(which & op_and)>::template args::add(this); choose_op<(which & op_xor)>::template args::add(this); choose_op<(which & op_or)>::template args::add(this); + choose_op<(which & op_gt)>::template args::add(this); + choose_op<(which & op_ge)>::template args::add(this); + choose_op<(which & op_lt)>::template args::add(this); + choose_op<(which & op_le)>::template args::add(this); + choose_op<(which & op_eq)>::template args::add(this); + choose_op<(which & op_ne)>::template args::add(this); choose_unary_op<(which & op_neg)>::template args::add(this); choose_unary_op<(which & op_pos)>::template args::add(this); choose_unary_op<(which & op_abs)>::template args::add(this); @@ -636,6 +651,12 @@ class extension_class choose_op<(which & op_xor)>::template args::add(this); choose_op<(which & op_or)>::template args::add(this); choose_op<(which & op_cmp)>::template args::add(this); + choose_op<(which & op_gt)>::template args::add(this); + choose_op<(which & op_ge)>::template args::add(this); + choose_op<(which & op_lt)>::template args::add(this); + choose_op<(which & op_le)>::template args::add(this); + choose_op<(which & op_eq)>::template args::add(this); + choose_op<(which & op_ne)>::template args::add(this); } template diff --git a/src/gen_init_function.py b/src/gen_init_function.py index 69935230..80a9c199 100644 --- a/src/gen_init_function.py +++ b/src/gen_init_function.py @@ -79,7 +79,8 @@ namespace detail { struct parameter_traits { private: - typedef const_ref_selector::value> selector; + enum { is_ref = boost::is_reference::value }; + typedef const_ref_selector selector; public: typedef typename selector::template const_ref::type const_reference; };