From ba1e6dfea28a472e4137984581ac96c7486c89b7 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Mon, 17 Oct 2011 15:02:08 -0200 Subject: Add constructor overload AutoDecRef(SbkObject*). --- libshiboken/autodecref.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libshiboken') diff --git a/libshiboken/autodecref.h b/libshiboken/autodecref.h index da496f6e1..8ab2c25a3 100644 --- a/libshiboken/autodecref.h +++ b/libshiboken/autodecref.h @@ -26,6 +26,7 @@ #include "sbkpython.h" #include "shibokenmacros.h" +class SbkObject; namespace Shiboken { @@ -40,6 +41,11 @@ public: * \param pyobj A borrowed reference to a Python object */ explicit AutoDecRef(PyObject* pyObj) : m_pyObj(pyObj) {} + /** + * AutoDecRef constructor. + * \param pyobj A borrowed reference to a Python object + */ + explicit AutoDecRef(SbkObject* pyObj) : m_pyObj(reinterpret_cast(pyObj)) {} /// Decref the borrowed python reference ~AutoDecRef() -- cgit v1.2.3