diff options
author | Simon Marchetto <simon.marchetto@scilab-enterprises.com> | 2013-10-10 14:50:51 +0200 |
---|---|---|
committer | Simon Marchetto <simon.marchetto@scilab-enterprises.com> | 2013-10-10 14:50:51 +0200 |
commit | 9b9b9cb9993a209167f36453cc5407a17eab2246 (patch) | |
tree | fc0ebb66dc3f653e266c8718aa2fb22c48cf3629 /Lib/scilab/scitypemaps.swg | |
parent | fd92e9e72f7e9db366a7d0055c21672ef89f0799 (diff) | |
download | swig-9b9b9cb9993a209167f36453cc5407a17eab2246.tar.gz |
Scilab: fix scalar typemaps & separate "interface" from "implementation"
Diffstat (limited to 'Lib/scilab/scitypemaps.swg')
-rw-r--r-- | Lib/scilab/scitypemaps.swg | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/scilab/scitypemaps.swg b/Lib/scilab/scitypemaps.swg index 36f3518b3..abcd7d2fb 100644 --- a/Lib/scilab/scitypemaps.swg +++ b/Lib/scilab/scitypemaps.swg @@ -262,8 +262,8 @@ /* ----------------------------------------------------------------------------- * --- Use enum from Scilab --- * ----------------------------------------------------------------------------- */ -%typemap(in, noblock=1, fragment="SWIG_SciInt32_AsEnum") enum SWIGTYPE (int val) { - if (SWIG_SciInt32_AsEnum(pvApiCtx, $input, &val, SWIG_Scilab_GetFname()) != SWIG_OK) { +%typemap(in, noblock=1, fragment=SWIG_AsVal_frag(Enum)) enum SWIGTYPE (int val) { + if (SWIG_AsVal_dec(Enum)($input, &val) != SWIG_OK) { return 0; } $1 = %reinterpret_cast(val, $ltype); @@ -272,10 +272,8 @@ /* ----------------------------------------------------------------------------- * --- Return enum to Scilab --- * ----------------------------------------------------------------------------- */ -%scilab_varout_typemap(constcode, SwigScilabInt32FromEnum, enum SWIGTYPE); - -%typemap(out, fragment="SWIG_SciInt32_FromEnum") enum SWIGTYPE { - if (SWIG_SciInt32_FromEnum(pvApiCtx, $result, $1, SWIG_Scilab_GetFname()) != SWIG_OK) { +%typemap(out, fragment=SWIG_From_frag(Enum)) enum SWIGTYPE { + if (SWIG_From_dec(Enum)($1) != SWIG_OK) { return SWIG_ERROR; } } |