more enum typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6730 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
47e0a3f07a
commit
b40f47a7fd
2 changed files with 7 additions and 1 deletions
|
|
@ -4,6 +4,12 @@
|
||||||
%apply int { enum SWIGTYPE };
|
%apply int { enum SWIGTYPE };
|
||||||
%apply const int& { const enum SWIGTYPE& };
|
%apply const int& { const enum SWIGTYPE& };
|
||||||
|
|
||||||
|
%typemap(in,fragment=SWIG_As_frag(int)) const enum SWIGTYPE& ($basetype temp) {
|
||||||
|
temp = SWIG_static_cast(SWIG_As(int)($input),$basetype);
|
||||||
|
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||||
|
$1 = &temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
%typemap(varin,fragment=SWIG_AsVal_frag(int)) enum SWIGTYPE
|
%typemap(varin,fragment=SWIG_AsVal_frag(int)) enum SWIGTYPE
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
$1 = SWIG_static_cast(SWIG_arg(as_meth($input)),$type);
|
$1 = SWIG_static_cast(SWIG_arg(as_meth($input)),$type);
|
||||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||||
}
|
}
|
||||||
%typemap(in,fragment=pyfrag) const Type & ($basetype temp) {
|
%typemap(in,fragment=pyfrag) const Type & ($*ltype temp) {
|
||||||
temp = SWIG_static_cast(SWIG_arg(as_meth($input)),$basetype);
|
temp = SWIG_static_cast(SWIG_arg(as_meth($input)),$basetype);
|
||||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||||
$1 = &temp;
|
$1 = &temp;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue