2
0
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:
Dave Abrahams
2000-11-03 15:59:49 +00:00
parent acf1fda727
commit 7230b5886f

View File

@@ -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)
{