set PyObject * out typemaps back to simple returns
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8584 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5a42618968
commit
b8bf059066
4 changed files with 5 additions and 24 deletions
|
|
@ -27,12 +27,15 @@
|
|||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
%inline {
|
||||
|
||||
SWIG_Object identity(SWIG_Object x) {
|
||||
#ifdef SWIGPYTHON
|
||||
Py_XINCREF(x);
|
||||
#endif
|
||||
return x;
|
||||
}
|
||||
|
||||
%}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@ namespace swig
|
|||
Mark methods that return new objects
|
||||
*/
|
||||
%newobject PySwigIterator::copy;
|
||||
%newobject PySwigIterator::value;
|
||||
%newobject PySwigIterator::next;
|
||||
%newobject PySwigIterator::previous;
|
||||
%newobject PySwigIterator::operator + (ptrdiff_t n) const;
|
||||
%newobject PySwigIterator::operator - (ptrdiff_t n) const;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,21 +83,6 @@
|
|||
}
|
||||
|
||||
|
||||
/* For output, we increase the reference object */
|
||||
%typemap(out,noblock=1) PyObject * {
|
||||
$result = $1;
|
||||
%#if !($owner)
|
||||
Py_XINCREF($result);
|
||||
%#endif
|
||||
}
|
||||
|
||||
%typemap(out,noblock=1) PyObject * const & {
|
||||
$result = *$1;
|
||||
%#if !($owner)
|
||||
Py_XINCREF($result);
|
||||
%#endif
|
||||
}
|
||||
|
||||
/* Consttab, needed for callbacks, it should be removed later */
|
||||
|
||||
%typemap(consttab) SWIGTYPE ((*)(ANY))
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
* ------------------------------------------------------------ */
|
||||
|
||||
%typemap(in) SWIG_Object "$1 = $input;";
|
||||
%typemap(freearg) SWIG_Object "";
|
||||
|
||||
%typemap(in,noblock=1) SWIG_Object const & ($*ltype temp)
|
||||
{
|
||||
|
|
@ -11,9 +10,6 @@
|
|||
$1 = &temp;
|
||||
}
|
||||
|
||||
%typemap(freearg) SWIG_Object const & "";
|
||||
|
||||
|
||||
%typemap(out,noblock=1) SWIG_Object {
|
||||
%set_output($1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue