put the swig::PyObject_var and swig::PyObject_ptr in the pyclass.swg file, to use them in more places

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7824 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-11-08 15:58:08 +00:00
commit 11b237dddd
5 changed files with 148 additions and 88 deletions

View file

@ -1,16 +1,3 @@
%fragment("PyObject_var","header")
{
namespace swig {
struct PyObject_var {
PyObject* ptr;
PyObject_var(PyObject* obj = 0) : ptr(obj) { }
~PyObject_var() { if (ptr) Py_DECREF(ptr); }
operator PyObject*() { return ptr; }
PyObject* operator->() const { return ptr; }
};
}
}
%fragment("StdTraits","header",fragment="StdTraitsCommon")
{
namespace swig {