sl@0: // Copyright David Abrahams 2002. sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: #ifndef LONG_DWA2002627_HPP sl@0: # define LONG_DWA2002627_HPP sl@0: sl@0: # include sl@0: sl@0: # include sl@0: # include sl@0: sl@0: namespace boost { namespace python { sl@0: sl@0: namespace detail sl@0: { sl@0: struct BOOST_PYTHON_DECL long_base : object sl@0: { sl@0: protected: sl@0: long_base(); // new long_ sl@0: explicit long_base(object_cref rhs); sl@0: explicit long_base(object_cref rhs, object_cref base); sl@0: sl@0: BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(long_base, object) sl@0: sl@0: private: sl@0: static detail::new_non_null_reference call(object const&); sl@0: static detail::new_non_null_reference call(object const&, object const&); sl@0: }; sl@0: } sl@0: sl@0: class long_ : public detail::long_base sl@0: { sl@0: typedef detail::long_base base; sl@0: public: sl@0: long_() {} // new long_ sl@0: sl@0: template sl@0: explicit long_(T const& rhs) sl@0: : detail::long_base(object(rhs)) sl@0: { sl@0: } sl@0: sl@0: template sl@0: explicit long_(T const& rhs, U const& base) sl@0: : detail::long_base(object(rhs), object(base)) sl@0: { sl@0: } sl@0: sl@0: public: // implementation detail -- for internal use only sl@0: BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(long_, base) sl@0: }; sl@0: sl@0: // sl@0: // Converter Specializations sl@0: // sl@0: namespace converter sl@0: { sl@0: template <> sl@0: struct object_manager_traits sl@0: : pytype_object_manager_traits<&PyLong_Type,long_> sl@0: { sl@0: }; sl@0: } sl@0: sl@0: }} // namespace boost::python sl@0: sl@0: #endif // LONG_DWA2002627_HPP