Merge remote-tracking branch 'origin/master' into windows
[scilab.git] / scilab / modules / jvm / sci_gateway / cpp / sci_system_setproperty.cpp
index 458df93..50e2ad4 100644 (file)
@@ -57,13 +57,10 @@ types::Function::ReturnValue sci_system_setproperty(types::typed_list &in, int _
         return types::Function::Error;
     }
 
-    char* pstProperty        = wide_string_to_UTF8(in[0]->getAs<types::String>()->get(0));
-    char* pstValue           = wide_string_to_UTF8(in[1]->getAs<types::String>()->get(0));
+    char* pstProperty        = in[0]->getAs<types::String>()->get(0);
+    char* pstValue           = in[1]->getAs<types::String>()->get(0);
     char* pstPreviousValue   = system_setproperty(pstProperty, pstValue);
 
-    FREE(pstProperty);
-    FREE(pstValue);
-
     if (pstPreviousValue)
     {
         types::String* pSPreviousValue = new types::String(pstPreviousValue);