[Freeswitch-svn] [commit] r9326 - in freeswitch/trunk/src: . include mod/languages/mod_java mod/languages/mod_lua mod/languages/mod_perl mod/languages/mod_python
Freeswitch SVN
anthm at freeswitch.org
Tue Aug 19 21:12:24 EDT 2008
Author: anthm
Date: Tue Aug 19 21:12:23 2008
New Revision: 9326
Modified:
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
freeswitch/trunk/src/switch_cpp.cpp
Log:
c++ needs const char * for static strings
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Tue Aug 19 21:12:23 2008
@@ -216,7 +216,7 @@
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);
Modified: freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp Tue Aug 19 21:12:23 2008
@@ -1886,7 +1886,7 @@
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);
}
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp Tue Aug 19 21:12:23 2008
@@ -4529,14 +4529,14 @@
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;
Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp Tue Aug 19 21:12:23 2008
@@ -5675,10 +5675,10 @@
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;
Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp Tue Aug 19 21:12:23 2008
@@ -6090,10 +6090,10 @@
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 @@
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;
}
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Tue Aug 19 21:12:23 2008
@@ -523,7 +523,7 @@
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;
More information about the Freeswitch-svn
mailing list