aboutsummaryrefslogtreecommitdiff
path: root/Lib/scilab
diff options
context:
space:
mode:
authorsimon <simon@debian82x64>2016-03-08 17:34:27 +0100
committersimon <simon@debian82x64>2016-03-08 17:37:39 +0100
commitb9bddada7a94a1fbb1b770da198162b985c211fc (patch)
tree9306285910a0ae89d37e7d73760de7a0b4e4dee1 /Lib/scilab
parent424bebb165dd8819fcf0e04095d33b536666be8a (diff)
downloadswig-b9bddada7a94a1fbb1b770da198162b985c211fc.tar.gz
scilab: fix object/pointer type checking
Diffstat (limited to 'Lib/scilab')
-rw-r--r--Lib/scilab/scitypemaps.swg11
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/scilab/scitypemaps.swg b/Lib/scilab/scitypemaps.swg
index 62a819f35..175a41b51 100644
--- a/Lib/scilab/scitypemaps.swg
+++ b/Lib/scilab/scitypemaps.swg
@@ -147,11 +147,18 @@
}
%enddef
+%define %scilab_typecheck_pointer(PRECEDENCE, TYPE)
+%typecheck(PRECEDENCE) TYPE {
+ $1 = SwigScilabCheckPtr(pvApiCtx, $input, $descriptor, SWIG_Scilab_GetFuncName());
+}
+%enddef
+
+
// Double (and Float) have priority over before Integer type.
// Primitive types
-%scilab_typecheck_generic(SWIG_TYPECHECK_VOIDPTR, isPointerType, SWIGTYPE *)
-%scilab_typecheck_generic(SWIG_TYPECHECK_POINTER, isPointerType, SWIGTYPE *)
+%scilab_typecheck_pointer(SWIG_TYPECHECK_VOIDPTR, SWIGTYPE *)
+%scilab_typecheck_pointer(SWIG_TYPECHECK_POINTER, SWIGTYPE *)
%scilab_typecheck_generic(SWIG_TYPECHECK_BOOL, isBooleanType, bool)
%scilab_typecheck_generic(16, isDoubleType, double)
%scilab_typecheck_generic(17, isDoubleType, float)