split lib_name of scilab-name for the read_write_boolean test 53/14653/2
Sylvain GENIN [Tue, 10 Jun 2014 12:22:24 +0000 (14:22 +0200)]
Change-Id: I18cf8e9dd44da3c590f5adb6743a7c75d4596d8a

scilab/modules/api_scilab/tests/unit_tests/read_write_boolean_api.c
scilab/modules/api_scilab/tests/unit_tests/read_write_boolean_api.tst
scilab/modules/dynamic_link/macros/ilib_gen_gateway.sci
scilab/modules/dynamic_link/macros/ilib_gen_loader.sci

index e657efc..546e300 100644 (file)
@@ -16,7 +16,7 @@
 #include "sciprint.h"
 #include "MALLOC.h"
 
-int read_write_boolean(char *fname, unsigned long fname_len)
+int read_write_boolean(char *fname, void *pvApiCtx)
 {
     SciErr sciErr;
     int i;
index ec4913d..6695a99 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- CLI SHELL MODE -->
+setenv("DEBUG_SCILAB_DYNAMIC_LINK", "YES");
 ilib_verbose(0);
 mkdir(pathconvert(TMPDIR+"/read_write_boolean_api"));
 cd(pathconvert(TMPDIR+"/read_write_boolean_api"));
index 6a761e0..3db812e 100644 (file)
@@ -79,7 +79,7 @@ function gateway_filename = ilib_gen_gateway(name,tables)
         "";
         "#define MODULE_NAME L""" + tname + """";
         "";
-        "int " + tname + "(wchar_t* _pwstFuncName)";
+        "int " + tname + "_gw(wchar_t* _pwstFuncName)";
         "{";
         "    if(wcscmp(_pwstFuncName, L""" + table(:,1) + """) == 0){ " + "symbol::Context::getInstance()->addFunction(types::Function::createFunction(L""" + table(:,1) + """, &" + names(:) + ", MODULE_NAME)); }";
         "";
@@ -124,7 +124,7 @@ function gateway_filename = ilib_gen_gateway(name,tables)
         "#define " + TNAME + "_GW_IMPEXP";
         "#endif";
         "";
-        "extern ""C"" " + TNAME + "_GW_IMPEXP int " + tname + "(wchar_t* _pwstFuncName);";
+        "extern ""C"" " + TNAME + "_GW_IMPEXP int " + tname + "_gw(wchar_t* _pwstFuncName);";
         "";
         gate(:, 2);
         "";
index 025859b..32e14dc 100644 (file)
@@ -200,7 +200,7 @@ function bOK = generateLoader(name, tables, libs, libname, flag, loadername)
             end
             mfprintf(fd, "];\n");
 
-            mfprintf(fd, "addinter(%s_path + filesep() + ''%s'' + getdynlibext(), ''%s'', list_functions);\n", shortlibname_path, ..
+            mfprintf(fd, "addinter(%s_path + filesep() + ''%s'' + getdynlibext(), ''%s_gw'', list_functions);\n", shortlibname_path, ..
             name, name);
         else
             // on link then a set of addinter