even more lang stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9063 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-07-16 21:06:14 +00:00
1 parent 920ef82cb3
commit df5afbcacd
16 files changed
+280 -42

No files matched your search

+2 -1
View File
@@ -20,7 +20,8 @@ mod_perl_wrap.cpp:
echo "#include \"mod_perl_extra.c\"" >> mod_perl_wrap.cpp
patch -s -p0 -i hack.diff
orig: mod_perl_wrap.cpp
patch -R -s -p0 -i hack.diff
freeswitch.$(DYNAMIC_LIB_EXTEN): $(LOCAL_OBJS) $(LOCAL_LIBADD)
$(LINK) $(SOLINK) -o freeswitch.$(DYNAMIC_LIB_EXTEN) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LDFLAGS)
@@ -13,7 +13,7 @@ Session::Session():CoreSession()
init_me();
}
Session::Session(char *uuid):CoreSession(uuid)
Session::Session(char *uuid, CoreSession *a_leg):CoreSession(uuid, a_leg)
{
init_me();
if (session && allocated) {
+1 -1
View File
@@ -28,7 +28,7 @@ class Session : public CoreSession {
SV *me;
public:
Session();
Session(char *uuid);
Session(char *uuid, CoreSession *a_leg = NULL);
Session(switch_core_session_t *session);
~Session();
+32 -6
View File
@@ -1,5 +1,5 @@
--- mod_perl_wrap.cpp 2008-07-16 13:38:11.000000000 -0500
+++ old.cpp 2008-07-16 13:37:44.000000000 -0500
--- 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 ;
@@ -22,7 +22,33 @@
XSRETURN(argvi);
fail:
SWIG_croak_null();
@@ -8874,6 +8879,7 @@
@@ -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;
@@ -30,7 +56,7 @@
dXSARGS;
if ((items < 1) || (items > 1)) {
@@ -8884,9 +8890,19 @@
@@ -8923,9 +8939,19 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
@@ -52,7 +78,7 @@
XSRETURN(argvi);
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
@@ -8902,6 +8918,7 @@
@@ -8941,6 +8967,7 @@
void *argp1 = 0 ;
int res1 = 0 ;
int argvi = 0;
@@ -60,7 +86,7 @@
dXSARGS;
if ((items < 1) || (items > 1)) {
@@ -8913,8 +8930,18 @@
@@ -8952,8 +8979,18 @@
}
arg1 = reinterpret_cast< switch_core_session_t * >(argp1);
result = (PERL::Session *)new PERL::Session(arg1);
+82 -2
View File
@@ -8872,6 +8872,55 @@ XS(_wrap_new_Session__SWIG_0) {
XS(_wrap_new_Session__SWIG_1) {
{
char *arg1 = (char *) 0 ;
CoreSession *arg2 = (CoreSession *) 0 ;
PERL::Session *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int argvi = 0;
SV *foo;
dXSARGS;
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: new_Session(uuid,a_leg);");
}
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Session" "', argument " "2"" of type '" "CoreSession *""'");
}
arg2 = reinterpret_cast< CoreSession * >(argp2);
result = (PERL::Session *)new PERL::Session(arg1,arg2);
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;
SWIG_croak_null();
}
}
XS(_wrap_new_Session__SWIG_2) {
{
char *arg1 = (char *) 0 ;
PERL::Session *result = 0 ;
@@ -8911,7 +8960,7 @@ XS(_wrap_new_Session__SWIG_1) {
}
XS(_wrap_new_Session__SWIG_2) {
XS(_wrap_new_Session__SWIG_3) {
{
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
PERL::Session *result = 0 ;
@@ -9005,13 +9054,44 @@ XS(_wrap_new_Session) {
}
check_3:
if (items == 2) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_4;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
void *vptr = 0;
int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_4;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 4;
if (_rank == _rankm) goto dispatch;
}
}
check_4:
dispatch:
switch(_index) {
case 1:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Session__SWIG_0); return;
case 2:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Session__SWIG_2); return;
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Session__SWIG_3); return;
case 3:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Session__SWIG_2); return;
case 4:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Session__SWIG_1); return;
}
}