diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-10-17 15:02:08 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-10-18 16:59:51 -0200 |
commit | ce79f7578e3d057e5a687b47d0d787c36da46cbd (patch) | |
tree | 632fa59aa7d34b43c3d3c1ea983792f63104f49c | |
parent | db044d298e2eb1853991ca73bb44a20783b0032f (diff) | |
download | shiboken-ce79f7578e3d057e5a687b47d0d787c36da46cbd.tar.gz shiboken-ce79f7578e3d057e5a687b47d0d787c36da46cbd.tar.xz shiboken-ce79f7578e3d057e5a687b47d0d787c36da46cbd.zip |
Add constructor overload AutoDecRef(SbkObject*).
-rw-r--r-- | libshiboken/autodecref.h | 6 |
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() |