[Tizen] fix crash caused by callback null 96/153396/1
authorJinho, Lee <jeano.lee@samsung.com>
Thu, 28 Sep 2017 06:19:39 +0000 (15:19 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Thu, 28 Sep 2017 06:19:41 +0000 (15:19 +0900)
This reverts commit b8ef435cd1e0873b90925404220af08da9eee284.

Change-Id: I98c0f4d96518117cd5bbee7b2239d215f5f1cd3f

dali-csharp-binder/src/common.h [changed mode: 0644->0755]
dali-csharp-binder/src/dali_wrap.cpp

old mode 100644 (file)
new mode 100755 (executable)
index 9f8d237..2418cf4
@@ -144,85 +144,17 @@ typedef struct
   SWIG_CSharpExceptionArgumentCallback_t callback;
 } SWIG_CSharpExceptionArgument_t;
 
-static SWIG_CSharpException_t SWIG_csharp_exceptions[] =
-{
-  { SWIG_CSharpApplicationException, NULL },
-  { SWIG_CSharpArithmeticException, NULL },
-  { SWIG_CSharpDivideByZeroException, NULL },
-  { SWIG_CSharpIndexOutOfRangeException, NULL },
-  { SWIG_CSharpInvalidCastException, NULL },
-  { SWIG_CSharpInvalidOperationException, NULL },
-  { SWIG_CSharpIOException, NULL },
-  { SWIG_CSharpNullReferenceException, NULL },
-  { SWIG_CSharpOutOfMemoryException, NULL },
-  { SWIG_CSharpOverflowException, NULL },
-  { SWIG_CSharpSystemException, NULL }
-};
+extern SWIG_CSharpException_t SWIG_csharp_exceptions[];
 
-static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] =
-{
-  { SWIG_CSharpArgumentException, NULL },
-  { SWIG_CSharpArgumentNullException, NULL },
-  { SWIG_CSharpArgumentOutOfRangeException, NULL }
-};
+extern SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[];
 
-static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg)
-{
-  SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
-  if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t))
-  {
-    callback = SWIG_csharp_exceptions[code].callback;
-  }
-  callback(msg);
-}
+extern void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg);
+
+extern void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name);
+
+extern void SWIG_CSharpException(int code, const char *msg);
 
-static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
-  SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
-  if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
-    callback = SWIG_csharp_exceptions_argument[code].callback;
-  }
-  callback(msg, param_name);
-}
 
-SWIGINTERN void SWIG_CSharpException(int code, const char *msg)
-{
-  if (code == SWIG_ValueError)
-  {
-    SWIG_CSharpExceptionArgumentCodes exception_code = SWIG_CSharpArgumentOutOfRangeException;
-    SWIG_CSharpSetPendingExceptionArgument(exception_code, msg, 0);
-  }
-  else
-  {
-    SWIG_CSharpExceptionCodes exception_code = SWIG_CSharpApplicationException;
-    switch(code)
-    {
-      case SWIG_MemoryError:
-        exception_code = SWIG_CSharpOutOfMemoryException;
-        break;
-      case SWIG_IndexError:
-        exception_code = SWIG_CSharpIndexOutOfRangeException;
-        break;
-      case SWIG_DivisionByZero:
-        exception_code = SWIG_CSharpDivideByZeroException;
-        break;
-      case SWIG_IOError:
-        exception_code = SWIG_CSharpIOException;
-        break;
-      case SWIG_OverflowError:
-        exception_code = SWIG_CSharpOverflowException;
-        break;
-      case SWIG_RuntimeError:
-      case SWIG_TypeError:
-      case SWIG_SyntaxError:
-      case SWIG_SystemError:
-      case SWIG_UnknownError:
-      default:
-        exception_code = SWIG_CSharpApplicationException;
-        break;
-    }
-    SWIG_CSharpSetPendingException(exception_code, msg);
-  }
-}
 
 #include <stdexcept>
 
index a286e08..253cdfd 100755 (executable)
@@ -204,7 +204,7 @@ typedef struct {
   SWIG_CSharpExceptionArgumentCallback_t callback;
 } SWIG_CSharpExceptionArgument_t;
 
-static SWIG_CSharpException_t SWIG_csharp_exceptions[] = {
+SWIG_CSharpException_t SWIG_csharp_exceptions[] = {
   { SWIG_CSharpApplicationException, NULL },
   { SWIG_CSharpArithmeticException, NULL },
   { SWIG_CSharpDivideByZeroException, NULL },
@@ -218,13 +218,13 @@ static SWIG_CSharpException_t SWIG_csharp_exceptions[] = {
   { SWIG_CSharpSystemException, NULL }
 };
 
-static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = {
+SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = {
   { SWIG_CSharpArgumentException, NULL },
   { SWIG_CSharpArgumentNullException, NULL },
   { SWIG_CSharpArgumentOutOfRangeException, NULL }
 };
 
-static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
+void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
   SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
   if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) {
     callback = SWIG_csharp_exceptions[code].callback;
@@ -232,7 +232,7 @@ static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes
   callback(msg);
 }
 
-static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
+void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
   SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
   if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
     callback = SWIG_csharp_exceptions_argument[code].callback;
@@ -378,7 +378,7 @@ namespace Swig {
 }
 
 
-SWIGINTERN void SWIG_CSharpException(int code, const char *msg) {
+void SWIG_CSharpException(int code, const char *msg) {
   if (code == SWIG_ValueError) {
     SWIG_CSharpExceptionArgumentCodes exception_code = SWIG_CSharpArgumentOutOfRangeException;
     SWIG_CSharpSetPendingExceptionArgument(exception_code, msg, 0);