fix macro type to 13 like scilab 5 88/19088/2
Antoine ELIAS [Fri, 10 Feb 2017 16:12:01 +0000 (17:12 +0100)]
function y = foo(x)
  y = acod(x);
end

type(acosd) => 13
type(foo) => 13
plot(1:10, factorial);
plot(-1:0.01:1, acosd);
plot(-1:0.01:1, foo);

Change-Id: Iceb4ef0e86a016a3bd2fb42244053773891ab358

scilab/modules/api_scilab/src/cpp/api_stack_common.cpp
scilab/modules/api_scilab/src/cpp/template/api_common.hpp
scilab/modules/core/sci_gateway/cpp/sci_type.cpp

index ff7b928..95ff87d 100644 (file)
@@ -519,8 +519,6 @@ SciErr getVarType(void *_pvCtx, int *_piAddress, int *_piType)
             *_piType = sci_strings;
             break;
         case types::InternalType::ScilabMacroFile :
-            *_piType = sci_u_function;
-            break;
         case types::InternalType::ScilabMacro :
             *_piType = sci_c_function;
             break;
index ed42ef9..be3069a 100644 (file)
@@ -84,8 +84,6 @@ int API_PROTO(getType)(scilabEnv env, scilabVar var)
             return sci_strings;
             break;
         case types::InternalType::ScilabMacroFile:
-            return sci_u_function;
-            break;
         case types::InternalType::ScilabMacro:
             return sci_c_function;
             break;
index 1cdc3c5..ed8715b 100644 (file)
@@ -73,8 +73,6 @@ types::Function::ReturnValue sci_type(types::typed_list &in, int _iRetCount, typ
             type = sci_strings;
             break;
         case types::InternalType::ScilabMacroFile :
-            type = sci_u_function;
-            break;
         case types::InternalType::ScilabMacro :
             type = sci_c_function;
             break;