add getGlobalVariable and setGlobalVariable to swig stuff

This commit is contained in:
Anthony Minessale committed 2011-10-21 08:56:42 -05:00
1 parent 8fde25ccfa
commit 2faaee0e6e
19 files changed
+641 -50

No files matched your search

+91 -20
View File
@@ -1566,6 +1566,26 @@ SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
SV *obj = sv_newmortal();
if (carray) {
sv_setpvn(obj, carray, size);
} else {
sv_setsv(obj, &PL_sv_undef);
}
return obj;
}
SWIGINTERNINLINE SV *
SWIG_FromCharPtr(const char *cptr)
{
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
}
SWIGINTERNINLINE SV *
SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value)
{
@@ -1707,26 +1727,6 @@ SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
}
SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
SV *obj = sv_newmortal();
if (carray) {
sv_setpvn(obj, carray, size);
} else {
sv_setsv(obj, &PL_sv_undef);
}
return obj;
}
SWIGINTERNINLINE SV *
SWIG_FromCharPtr(const char *cptr)
{
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
}
SWIGINTERNINLINE SV *
SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
{
@@ -1915,6 +1915,75 @@ SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SW
#ifdef __cplusplus
extern "C" {
#endif
XS(_wrap_setGlobalVariable) {
{
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: setGlobalVariable(var_name,var_val);");
}
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setGlobalVariable" "', argument " "1"" of type '" "char *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setGlobalVariable" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
setGlobalVariable(arg1,arg2);
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
XSRETURN(argvi);
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
SWIG_croak_null();
}
}
XS(_wrap_getGlobalVariable) {
{
char *arg1 = (char *) 0 ;
char *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: getGlobalVariable(var_name);");
}
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getGlobalVariable" "', argument " "1"" of type '" "char *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
result = (char *)getGlobalVariable(arg1);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
free(result);
XSRETURN(argvi);
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
SWIG_croak_null();
}
}
XS(_wrap_consoleLog) {
{
char *arg1 = (char *) 0 ;
@@ -9545,6 +9614,8 @@ static swig_variable_info swig_variables[] = {
{0,0,0,0}
};
static swig_command_info swig_commands[] = {
{"freeswitchc::setGlobalVariable", _wrap_setGlobalVariable},
{"freeswitchc::getGlobalVariable", _wrap_getGlobalVariable},
{"freeswitchc::consoleLog", _wrap_consoleLog},
{"freeswitchc::consoleCleanLog", _wrap_consoleCleanLog},
{"freeswitchc::email", _wrap_email},