Scilab: wrap enums to Scilab variables (if %feature scilab:const")
This commit is contained in:
parent
2cf606c638
commit
ed135cb99c
4 changed files with 48 additions and 11 deletions
|
|
@ -378,7 +378,7 @@
|
|||
//%apply int { size_t };
|
||||
|
||||
/* -----------------------------------------------------------------------------*/
|
||||
/* Constants
|
||||
/* Constants and enums to Scilab variables
|
||||
/* -----------------------------------------------------------------------------*/
|
||||
|
||||
%typemap(scilabconstcode, fragment=SWIG_CreateScilabVariable_frag(int)) int
|
||||
|
|
@ -404,3 +404,9 @@
|
|||
if (SWIG_CreateScilabVariable_charptr(pvApiCtx, "$result", $value) != SWIG_OK)
|
||||
return SWIG_ERROR;
|
||||
%}
|
||||
|
||||
%typemap(scilabconstcode, fragment=SWIG_CreateScilabVariable_frag(int)) enum SWIGTYPE
|
||||
%{
|
||||
if (SWIG_CreateScilabVariable_int(pvApiCtx, "$result", $value) != SWIG_OK)
|
||||
return SWIG_ERROR;
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue