Revert "[Tizen] fix TCT BLOCK issue" 94/140394/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 25 Jul 2017 00:26:18 +0000 (09:26 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 25 Jul 2017 00:26:31 +0000 (09:26 +0900)
This reverts commit 43562987cc26cfd85f7d91676377ec2de24e8bb4.

Change-Id: I6672456781aec0a81f3a012a365595d68c9de222

dali-csharp-binder/src/application.cpp
dali-csharp-binder/src/dali_wrap.cpp
dali-csharp-binder/src/window.cpp

index cac5a2d..4b2220a 100755 (executable)
@@ -24,7 +24,7 @@
 
 /* Callback for returning strings to C# without leaking memory */
 typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *);
-extern SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback;
+static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL;
 
 
 // keep argcs and argv so they're always available to DALi
@@ -115,12 +115,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_New__SWIG_1(int jarg1) {
     // allocate the string data
     for( int i=0; i < numStrings; i++)
     {
-      array[i]=(char *)malloc( stringLength * sizeof(char) );
+      array[i]=(char *)malloc( stringLength * sizeof(char *) );
     }
     array[ numStrings ] =  NULL; // we allocated +1 for hold the NULL part
 
-    std::string temp = "dali-csharp-app";
-    array[0][temp.copy(array[0], strlen(array[0])-1)] = '\0';
+    strcpy( array[0], "dali-csharp-app");
 
     arg1 = &argC;
     arg2 = &argV;
@@ -165,12 +164,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_New__SWIG_2(int jarg1, cha
     // allocate the string data
     for( int i=0; i < numStrings; i++)
     {
-      array[i]=(char *)malloc( stringLength * sizeof(char) );
+      array[i]=(char *)malloc( stringLength * sizeof(char *) );
     }
     array[ numStrings ] =  NULL; // we allocated +1 for hold the NULL part
 
-    std::string temp = "dali-csharp-app";
-    array[0][temp.copy(array[0], strlen(array[0])-1)] = '\0';
+    strcpy( array[0], "dali-csharp-app");
 
     arg1 = &argC;
     arg2 = &argV;
@@ -225,12 +223,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_New__SWIG_3(int jarg1, cha
     // allocate the string data
     for( int i=0; i < numStrings; i++)
     {
-      array[i]=(char *)malloc( stringLength * sizeof(char) );
+      array[i]=(char *)malloc( stringLength * sizeof(char *) );
     }
     array[ numStrings ] =  NULL; // we allocated +1 for hold the NULL part
 
-    std::string temp = "dali-csharp-app";
-    array[0][temp.copy(array[0], strlen(array[0])-1)] = '\0';
+    strcpy( array[0], "dali-csharp-app");
 
     arg1 = &argC;
     arg2 = &argV;
@@ -1430,12 +1427,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Application_New__SWIG_4(int jarg1, cha
     // allocate the string data
     for( int i=0; i < numStrings; i++)
     {
-      array[i]=(char *)malloc( stringLength * sizeof(char) );
+      array[i]=(char *)malloc( stringLength * sizeof(char *) );
     }
     array[ numStrings ] =  NULL; // we allocated +1 for hold the NULL part
 
-    std::string temp = "dali-csharp-app";
-    array[0][temp.copy(array[0], strlen(array[0])-1)] = '\0';
+    strcpy( array[0], "dali-csharp-app");
 
     arg1 = &argC;
     arg2 = &argV;
index 211add2..0dc30d1 100755 (executable)
@@ -284,7 +284,7 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_NDalic(
 
 /* Callback for returning strings to C# without leaking memory */
 typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *);
-SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL;
+static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL;
 
 
 #ifdef __cplusplus
@@ -3721,18 +3721,21 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_DaliException(char * jarg1, char *
 
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_DaliException_location_set(void * jarg1, char * jarg2) {
   Dali::DaliException *arg1 = (Dali::DaliException *) 0 ;
-  std::string arg2 = std::string(jarg2);
+  char *arg2 = (char *) 0 ;
 
   arg1 = (Dali::DaliException *)jarg1;
+  arg2 = (char *)jarg2;
   {
-    if (!arg2.empty()) {
-      ((char *)(arg1->location))[arg2.copy((char*)(arg1->location), strlen(arg1->location)-1)] = '\0';
+    if (arg2) {
+      arg1->location = (char const *) (new char[strlen((const char *)arg2)+1]);
+      strncpy((char *)arg1->location, (const char *)arg2, strlen((const char *)arg2));
     } else {
       arg1->location = 0;
     }
   }
 }
 
+
 SWIGEXPORT char * SWIGSTDCALL CSharp_Dali_DaliException_location_get(void * jarg1) {
   char * jresult ;
   Dali::DaliException *arg1 = (Dali::DaliException *) 0 ;
@@ -3747,12 +3750,14 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_Dali_DaliException_location_get(void * jarg
 
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_DaliException_condition_set(void * jarg1, char * jarg2) {
   Dali::DaliException *arg1 = (Dali::DaliException *) 0 ;
-  std::string arg2 = std::string(jarg2);
+  char *arg2 = (char *) 0 ;
 
   arg1 = (Dali::DaliException *)jarg1;
+  arg2 = (char *)jarg2;
   {
-    if (!arg2.empty()) {
-      ((char *)(arg1->condition))[arg2.copy((char*)(arg1->condition), strlen(arg1->condition)-1)] = '\0';
+    if (arg2) {
+      arg1->condition = (char const *) (new char[strlen((const char *)arg2)+1]);
+      strncpy((char *)arg1->condition, (const char *)arg2, strlen((const char *)arg2));
     } else {
       arg1->condition = 0;
     }
index 1c985f5..d732b10 100755 (executable)
@@ -25,7 +25,7 @@
 
 /* Callback for returning strings to C# without leaking memory */
 typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *);
-extern SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback;
+static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL;