mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-24 18:41:57 +00:00
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9063 d0543943-73ff-0310-b7d9-9358b9ac24b2
110 lines
3.6 KiB
Diff
110 lines
3.6 KiB
Diff
--- mod_perl_wrap.cpp 2008-07-16 16:55:53.000000000 -0400
|
|
+++ old.cpp 2008-07-16 16:55:38.000000000 -0400
|
|
@@ -8852,13 +8852,18 @@
|
|
{
|
|
PERL::Session *result = 0 ;
|
|
int argvi = 0;
|
|
+ SV *foo;
|
|
dXSARGS;
|
|
-
|
|
+
|
|
if ((items < 0) || (items > 0)) {
|
|
SWIG_croak("Usage: new_Session();");
|
|
}
|
|
- result = (PERL::Session *)new PERL::Session();
|
|
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
|
+ result = (PERL::Session *)new PERL::Session();
|
|
+ result->setPERL(my_perl);
|
|
+ foo = sv_newmortal();
|
|
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
|
+ result->setME(foo);
|
|
+ ST(argvi) = foo; argvi++ ;
|
|
XSRETURN(argvi);
|
|
fail:
|
|
SWIG_croak_null();
|
|
@@ -8877,6 +8882,7 @@
|
|
void *argp2 = 0 ;
|
|
int res2 = 0 ;
|
|
int argvi = 0;
|
|
+ SV *foo;
|
|
dXSARGS;
|
|
|
|
if ((items < 2) || (items > 2)) {
|
|
@@ -8893,7 +8899,16 @@
|
|
}
|
|
arg2 = reinterpret_cast< CoreSession * >(argp2);
|
|
result = (PERL::Session *)new PERL::Session(arg1,arg2);
|
|
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
|
+ if (result->allocated) {
|
|
+ result->setPERL(my_perl);
|
|
+ foo = get_sv(result->suuid, TRUE);
|
|
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
|
+ result->setME(foo);
|
|
+ } else {
|
|
+ foo = sv_newmortal();
|
|
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
|
+ }
|
|
+ ST(argvi) = foo; argvi++ ;
|
|
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
|
|
|
XSRETURN(argvi);
|
|
@@ -8913,6 +8928,7 @@
|
|
char *buf1 = 0 ;
|
|
int alloc1 = 0 ;
|
|
int argvi = 0;
|
|
+ SV *foo;
|
|
dXSARGS;
|
|
|
|
if ((items < 1) || (items > 1)) {
|
|
@@ -8923,9 +8939,19 @@
|
|
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'");
|
|
}
|
|
arg1 = reinterpret_cast< char * >(buf1);
|
|
- result = (PERL::Session *)new PERL::Session(arg1);
|
|
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
|
+ result = (PERL::Session *)new PERL::Session(arg1);
|
|
+ if (result->allocated) {
|
|
+ result->setPERL(my_perl);
|
|
+ foo = get_sv(result->suuid, TRUE);
|
|
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
|
+ result->setME(foo);
|
|
+ } else {
|
|
+ foo = sv_newmortal();
|
|
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
|
+ }
|
|
+ ST(argvi) = foo; argvi++ ;
|
|
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
|
+
|
|
XSRETURN(argvi);
|
|
fail:
|
|
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
|
@@ -8941,6 +8967,7 @@
|
|
void *argp1 = 0 ;
|
|
int res1 = 0 ;
|
|
int argvi = 0;
|
|
+ SV *foo;
|
|
dXSARGS;
|
|
|
|
if ((items < 1) || (items > 1)) {
|
|
@@ -8952,8 +8979,18 @@
|
|
}
|
|
arg1 = reinterpret_cast< switch_core_session_t * >(argp1);
|
|
result = (PERL::Session *)new PERL::Session(arg1);
|
|
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
|
-
|
|
+ if (result->allocated) {
|
|
+ result->setPERL(my_perl);
|
|
+ foo = get_sv(result->suuid, TRUE);
|
|
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
|
+ result->setME(foo);
|
|
+ } else {
|
|
+ foo = sv_newmortal();
|
|
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
|
+ }
|
|
+
|
|
+ ST(argvi) = foo; argvi++ ;
|
|
+
|
|
XSRETURN(argvi);
|
|
fail:
|
|
|