Implemented copy constructor to PyObjectWrapper.

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
          Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
Renato Filho 2010-07-05 14:22:08 -03:00
commit 82d1d82755
2 changed files with 46 additions and 5 deletions

View file

@ -50,9 +50,11 @@ namespace PySide
class PYSIDE_API PyObjectWrapper
{
public:
PyObjectWrapper(PyObject* me) : m_me(me) { Py_INCREF(m_me); }
PyObjectWrapper() : m_me(Py_None) { Py_INCREF(m_me); }
operator PyObject*() const { return m_me; }
PyObjectWrapper();
PyObjectWrapper(PyObject* me);
PyObjectWrapper(const PyObjectWrapper &other);
~PyObjectWrapper();
operator PyObject*() const;
private:
PyObject* m_me;
};