]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
c++ needs const char * for static strings
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 20 Aug 2008 01:12:23 +0000 (01:12 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 20 Aug 2008 01:12:23 +0000 (01:12 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9326 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_cpp.h
src/mod/languages/mod_java/switch_swig_wrap.cpp
src/mod/languages/mod_lua/mod_lua_wrap.cpp
src/mod/languages/mod_perl/mod_perl_wrap.cpp
src/mod/languages/mod_python/mod_python_wrap.cpp
src/switch_cpp.cpp

index 8dd02279329c0e5acb4abccf3c7e1287a44420f7..58f46eafafc044f8f767d146348262867d12677a 100644 (file)
@@ -216,7 +216,7 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
 
                 SWITCH_DECLARE(int) answer();
                 SWITCH_DECLARE(int) preAnswer();
-                SWITCH_DECLARE(void) hangup(char *cause = "normal_clearing");
+                SWITCH_DECLARE(void) hangup(const char *cause = "normal_clearing");
                 SWITCH_DECLARE(void) setVariable(char *var, char *val);
                 SWITCH_DECLARE(void) setPrivate(char *var, void *val);
                 SWITCH_DECLARE(void *) getPrivate(char *var);
index 471669747692cd813d2dba6a003c8db07517c469..88ffa0af1ba85085af1e11bc36ce30594d0fbb16 100644 (file)
@@ -1886,7 +1886,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hang
     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
     if (!arg2) return ;
   }
-  (arg1)->hangup(arg2);
+  (arg1)->hangup((char const *)arg2);
   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
 }
 
index c13d3140fb9e75e59d142b6ebe6a0cbcd2f5bb13..c1c864fb798d065778fdc9b8876934512084fda9 100644 (file)
@@ -4529,14 +4529,14 @@ static int _wrap_CoreSession_hangup__SWIG_0(lua_State* L) {
   
   SWIG_check_num_args("hangup",2,2)
   if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup",1,"CoreSession *");
-  if(!lua_isstring(L,2)) SWIG_fail_arg("hangup",2,"char *");
+  if(!lua_isstring(L,2)) SWIG_fail_arg("hangup",2,"char const *");
   
   if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
     SWIG_fail_ptr("CoreSession_hangup",1,SWIGTYPE_p_CoreSession);
   }
   
   arg2 = (char *)lua_tostring(L, 2);
-  (arg1)->hangup(arg2);
+  (arg1)->hangup((char const *)arg2);
   SWIG_arg=0;
   
   return SWIG_arg;
index 6cba7b4f6d84a4cd6296df9837c8343127b4b686..0d606dd77ae38464ecf51f73c5f018367bda1022 100644 (file)
@@ -5675,10 +5675,10 @@ XS(_wrap_CoreSession_hangup__SWIG_0) {
     arg1 = reinterpret_cast< CoreSession * >(argp1);
     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
     if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char *""'");
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char const *""'");
     }
     arg2 = reinterpret_cast< char * >(buf2);
-    (arg1)->hangup(arg2);
+    (arg1)->hangup((char const *)arg2);
     
     
     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
index 2bf13206dfcade1040aea56be824ec2837db1562..60155d014b9a8c2ba1a6fee8ee7532dbc423b3b7 100644 (file)
@@ -6090,10 +6090,10 @@ SWIGINTERN PyObject *_wrap_CoreSession_hangup__SWIG_0(PyObject *SWIGUNUSEDPARM(s
   arg1 = reinterpret_cast< CoreSession * >(argp1);
   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char *""'");
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char const *""'");
   }
   arg2 = reinterpret_cast< char * >(buf2);
-  (arg1)->hangup(arg2);
+  (arg1)->hangup((char const *)arg2);
   resultobj = SWIG_Py_Void();
   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   return resultobj;
@@ -6160,7 +6160,7 @@ SWIGINTERN PyObject *_wrap_CoreSession_hangup(PyObject *self, PyObject *args) {
 fail:
   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_hangup'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    hangup(CoreSession *,char *)\n"
+    "    hangup(CoreSession *,char const *)\n"
     "    hangup(CoreSession *)\n");
   return NULL;
 }
index a1e5b7ff7ab1d9a0ba251d3a37d36b62555b4c86..7b81769b54206e06cb226be379367e96a2be2eaf 100644 (file)
@@ -523,7 +523,7 @@ SWITCH_DECLARE(int) CoreSession::preAnswer()
     return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
 }
 
-SWITCH_DECLARE(void) CoreSession::hangup(char *cause)
+SWITCH_DECLARE(void) CoreSession::hangup(const char *cause)
 {
        this_check_void();
        sanity_check_noreturn;