summaryrefslogtreecommitdiffstats
path: root/libshiboken/autodecref.h
diff options
context:
space:
mode:
Diffstat (limited to 'libshiboken/autodecref.h')
-rw-r--r--libshiboken/autodecref.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libshiboken/autodecref.h b/libshiboken/autodecref.h
index da496f6e..8ab2c25a 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<PyObject*>(pyObj)) {}
/// Decref the borrowed python reference
~AutoDecRef()