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:
parent
73a821d0b6
commit
11b237dddd
5 changed files with 148 additions and 88 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue