mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 05:22:45 +00:00
Fix friend function instantiation bug caught by Metrowerks (thanks
Metrowerks!) [SVN r8111]
This commit is contained in:
8
pyptr.h
8
pyptr.h
@@ -28,13 +28,13 @@ template <class T, class Base>
|
||||
struct PyPtrConversions : Base
|
||||
{
|
||||
inline friend T from_python(PyObject* x, py::Type<const T&>)
|
||||
{ return T(x, T::new_ref); }
|
||||
{ return T(py::Downcast<T::value_type>(x).get(), T::new_ref); }
|
||||
|
||||
inline friend T from_python(PyObject* x, py::Type<T>)
|
||||
{ return T(x, T::new_ref); }
|
||||
{ return T(py::Downcast<T::value_type>(x).get(), T::new_ref); }
|
||||
|
||||
inline friend PyObject* to_python(T x)
|
||||
{ return x.release(); }
|
||||
{ return as_object(x.release()); }
|
||||
|
||||
};
|
||||
|
||||
@@ -49,6 +49,8 @@ class PyPtr
|
||||
boost::dereferenceable<PyPtr<T>, T*> > // supplies op->
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
|
||||
PyPtr(const PyPtr& rhs)
|
||||
: m_p(rhs.m_p)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user