add extern for C includes and remove old gateways declarations 36/2036/3
antoine ELIAS [Wed, 22 Sep 2010 08:40:22 +0000 (10:40 +0200)]
Change-Id: Ic40ba636e48e874dc0cba4760d0b8f22f1ade0b1

scilab/modules/string/includes/gw_string.h
scilab/modules/string/sci_gateway/cpp/string_gw.cpp

index 2fc8275..8327188 100644 (file)
@@ -41,7 +41,6 @@ STRING_IMPEXP int sci_strtod(char *fname,unsigned long fname_len);
 //STRING_IMPEXP int sci_NumTokens(char *fname,unsigned long fname_len);
 
 //YaSp
-STRING_IMPEXP int sci_length(char *fname, int* _piKey);
 STRING_IMPEXP int sci_strsplit(char *fname, int* _piKey);
 STRING_IMPEXP int sci_isdigit(char *fname, int* _piKey);
 STRING_IMPEXP int sci_isalphanum(char *fname, int* _piKey);
index cfbc935..99cb18b 100644 (file)
  */
 
 #include "string_gw.hxx"
+extern "C"
+{
+    #include "gw_string.h"
+}
 
 #define MODULE_NAME L"string"
 
@@ -23,5 +27,6 @@ bool StringModule::Load()
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"length", &sci_length, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"strindex", &sci_strindex, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"strsubst", &sci_strsubst, MODULE_NAME));
+    symbol::Context::getInstance()->AddFunction(Function::createFunction(L"strsplit", &sci_strsplit, MODULE_NAME));
     return true;
 }