File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
include/boost/python/object Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ struct BOOST_PYTHON_DECL class_base : noncopyable
3838 // any bases.
3939 );
4040
41- // Retrieve a pointer to the underlying object
42- PyObject* object () const { return m_object. get () ; }
41+ // Retrieve the underlying object
42+ ref object () const { return m_object; }
4343 private:
4444 ref m_object;
4545};
Original file line number Diff line number Diff line change 99# include < boost/python/converter/class.hpp>
1010# include < boost/python/object/class_wrapper.hpp>
1111# include < boost/mpl/for_each.hpp>
12+ # include < boost/python/reference.hpp>
1213
1314namespace boost { namespace python { namespace objects {
1415
@@ -20,7 +21,7 @@ struct class_converters
2021{
2122 public: // member functions
2223 // Constructor takes the python class object associated with T
23- class_converters (PyObject* python_class);
24+ class_converters (ref const & python_class);
2425
2526 private: // data members
2627 converter::class_unwrapper<Derived> m_unwrapper;
@@ -86,7 +87,7 @@ struct register_base_of
8687};
8788
8889template <class Derived , class Bases >
89- class_converters<Derived,Bases>::class_converters(PyObject* type_object)
90+ class_converters<Derived,Bases>::class_converters(ref const & type_object)
9091 : m_wrapper(type_object)
9192{
9293 // register all up/downcasts here
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ template <class T>
1818struct class_wrapper
1919 : converter::wrapper<T const &>
2020{
21- class_wrapper (PyObject* type_)
21+ class_wrapper (ref const & type_)
2222 : m_class_object(type_)
2323 {
2424# ifndef NDEBUG
You can’t perform that action at this time.
0 commit comments