diff options
-rwxr-xr-x | sci_gateway/cpp/libscilab_octave.so | bin | 32008 -> 32008 bytes | |||
-rw-r--r-- | sci_gateway/cpp/sci_octave.cpp | 3 | ||||
-rw-r--r-- | src/fun.cpp | 9 | ||||
-rw-r--r-- | src/fun.h | 1 | ||||
-rw-r--r-- | src/fun.o | bin | 4836152 -> 4850888 bytes | |||
-rwxr-xr-x | src/libfun.so | bin | 2973816 -> 2978856 bytes | |||
-rwxr-xr-x | src/testfun | bin | 41304 -> 41320 bytes | |||
-rw-r--r-- | thirdparty/linux/include/fun.h | 1 | ||||
-rwxr-xr-x | thirdparty/linux/lib/x64/libfun.so | bin | 2973816 -> 2978856 bytes |
9 files changed, 14 insertions, 0 deletions
diff --git a/sci_gateway/cpp/libscilab_octave.so b/sci_gateway/cpp/libscilab_octave.so Binary files differindex eb7abf5..221c3c8 100755 --- a/sci_gateway/cpp/libscilab_octave.so +++ b/sci_gateway/cpp/libscilab_octave.so diff --git a/sci_gateway/cpp/sci_octave.cpp b/sci_gateway/cpp/sci_octave.cpp index 1a23000..1ccda51 100644 --- a/sci_gateway/cpp/sci_octave.cpp +++ b/sci_gateway/cpp/sci_octave.cpp @@ -367,6 +367,9 @@ extern "C" } } } + else if (ins[i].is_out_string == 1){ + out[i] = scilab_createString(env, (wchar_t *) ins[i].out_data_real); + } else { //printf("output %d is NOT complex\n", i); diff --git a/src/fun.cpp b/src/fun.cpp index 9017584..1362e67 100644 --- a/src/fun.cpp +++ b/src/fun.cpp @@ -303,6 +303,15 @@ extern "C" idx++;
}
}
+ else if(out(ii).is_string()){
+ inp[ii].is_out_string = 1;
+
+ octave_value currOut = out(ii);
+ std::string currOutStr = currOut.string_value();
+
+ inp[ii].out_data_real = malloc(sizeof(wchar_t) * (currOutStr.length() + 1));
+ mbstowcs((wchar_t *) inp[ii].out_data_real, currOutStr.c_str(), currOutStr.length() + 1);
+ }
else
{
//std::cout << "out "<< ii<< " is NOT complex" << '\n';
@@ -42,6 +42,7 @@ extern "C" int n_out_struct_len; // op struct length int is_in_cmplx; int is_out_cmplx; + int is_out_string; int is_out_struct; void* in_data_real; void* in_data_img; Binary files differdiff --git a/src/libfun.so b/src/libfun.so Binary files differindex 6dd4f31..581c20b 100755 --- a/src/libfun.so +++ b/src/libfun.so diff --git a/src/testfun b/src/testfun Binary files differindex a31b907..e17d476 100755 --- a/src/testfun +++ b/src/testfun diff --git a/thirdparty/linux/include/fun.h b/thirdparty/linux/include/fun.h index 7336957..f79fbf4 100644 --- a/thirdparty/linux/include/fun.h +++ b/thirdparty/linux/include/fun.h @@ -42,6 +42,7 @@ extern "C" int n_out_struct_len; // op struct length int is_in_cmplx; int is_out_cmplx; + int is_out_string; int is_out_struct; void* in_data_real; void* in_data_img; diff --git a/thirdparty/linux/lib/x64/libfun.so b/thirdparty/linux/lib/x64/libfun.so Binary files differindex 6dd4f31..581c20b 100755 --- a/thirdparty/linux/lib/x64/libfun.so +++ b/thirdparty/linux/lib/x64/libfun.so |