fix perl swig patching to work with latest swig from debian jessie

This commit is contained in:
Brian West 2015-06-16 12:03:04 -05:00
parent 7cc657e1eb
commit 6a903e2397
2 changed files with 51 additions and 27 deletions

View File

@ -1,19 +1,18 @@
--- mod_perl_wrap.cpp 2008-07-16 16:55:53.000000000 -0400 --- mod_perl_wrap.cpp.old 2015-06-16 12:01:31.832000000 -0500
+++ old.cpp 2008-07-16 16:55:38.000000000 -0400 +++ mod_perl_wrap.cpp 2015-06-16 12:01:38.996000000 -0500
@@ -8852,13 +8852,18 @@ @@ -8710,13 +8710,18 @@
{ {
PERL::Session *result = 0 ;
int argvi = 0; int argvi = 0;
+ SV *foo; PERL::Session *result = 0 ;
+ SV *foo;
dXSARGS; dXSARGS;
-
+
if ((items < 0) || (items > 0)) { if ((items < 0) || (items > 0)) {
SWIG_croak("Usage: new_Session();"); SWIG_croak("Usage: new_Session();");
} }
- result = (PERL::Session *)new PERL::Session(); - result = (PERL::Session *)new PERL::Session();
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ; - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+ result = (PERL::Session *)new PERL::Session(); + result = (PERL::Session *)new PERL::Session();
+ result->setPERL(my_perl); + result->setPERL(my_perl);
+ foo = sv_newmortal(); + foo = sv_newmortal();
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); + SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
@ -22,15 +21,15 @@
XSRETURN(argvi); XSRETURN(argvi);
fail: fail:
SWIG_croak_null(); SWIG_croak_null();
@@ -8877,6 +8882,7 @@ @@ -8735,6 +8740,7 @@
void *argp2 = 0 ;
int res2 = 0 ; int res2 = 0 ;
int argvi = 0; int argvi = 0;
PERL::Session *result = 0 ;
+ SV *foo; + SV *foo;
dXSARGS; dXSARGS;
if ((items < 2) || (items > 2)) { if ((items < 2) || (items > 2)) {
@@ -8893,7 +8899,16 @@ @@ -8751,7 +8757,16 @@
} }
arg2 = reinterpret_cast< CoreSession * >(argp2); arg2 = reinterpret_cast< CoreSession * >(argp2);
result = (PERL::Session *)new PERL::Session(arg1,arg2); result = (PERL::Session *)new PERL::Session(arg1,arg2);
@ -48,15 +47,15 @@
if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
XSRETURN(argvi); XSRETURN(argvi);
@@ -8913,6 +8928,7 @@ @@ -8771,6 +8786,7 @@
char *buf1 = 0 ;
int alloc1 = 0 ; int alloc1 = 0 ;
int argvi = 0; int argvi = 0;
PERL::Session *result = 0 ;
+ SV *foo; + SV *foo;
dXSARGS; dXSARGS;
if ((items < 1) || (items > 1)) { if ((items < 1) || (items > 1)) {
@@ -8923,9 +8939,19 @@ @@ -8781,9 +8797,19 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'");
} }
arg1 = reinterpret_cast< char * >(buf1); arg1 = reinterpret_cast< char * >(buf1);
@ -78,15 +77,15 @@
XSRETURN(argvi); XSRETURN(argvi);
fail: fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
@@ -8941,6 +8967,7 @@ @@ -8799,6 +8825,7 @@
void *argp1 = 0 ;
int res1 = 0 ; int res1 = 0 ;
int argvi = 0; int argvi = 0;
PERL::Session *result = 0 ;
+ SV *foo; + SV *foo;
dXSARGS; dXSARGS;
if ((items < 1) || (items > 1)) { if ((items < 1) || (items > 1)) {
@@ -8952,8 +8979,18 @@ @@ -8810,8 +8837,18 @@
} }
arg1 = reinterpret_cast< switch_core_session_t * >(argp1); arg1 = reinterpret_cast< switch_core_session_t * >(argp1);
result = (PERL::Session *)new PERL::Session(arg1); result = (PERL::Session *)new PERL::Session(arg1);

View File

@ -8576,7 +8576,6 @@ XS(_wrap_bridge) {
void *argp2 = 0 ; void *argp2 = 0 ;
int res2 = 0 ; int res2 = 0 ;
int argvi = 0; int argvi = 0;
SV *foo;
dXSARGS; dXSARGS;
if ((items < 2) || (items > 2)) { if ((items < 2) || (items > 2)) {
@ -8711,13 +8710,18 @@ XS(_wrap_new_Session__SWIG_0) {
{ {
int argvi = 0; int argvi = 0;
PERL::Session *result = 0 ; PERL::Session *result = 0 ;
SV *foo;
dXSARGS; dXSARGS;
if ((items < 0) || (items > 0)) { if ((items < 0) || (items > 0)) {
SWIG_croak("Usage: new_Session();"); SWIG_croak("Usage: new_Session();");
} }
result = (PERL::Session *)new PERL::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->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); XSRETURN(argvi);
fail: fail:
SWIG_croak_null(); SWIG_croak_null();
@ -8736,6 +8740,7 @@ XS(_wrap_new_Session__SWIG_1) {
int res2 = 0 ; int res2 = 0 ;
int argvi = 0; int argvi = 0;
PERL::Session *result = 0 ; PERL::Session *result = 0 ;
SV *foo;
dXSARGS; dXSARGS;
if ((items < 2) || (items > 2)) { if ((items < 2) || (items > 2)) {
@ -8781,6 +8786,7 @@ XS(_wrap_new_Session__SWIG_2) {
int alloc1 = 0 ; int alloc1 = 0 ;
int argvi = 0; int argvi = 0;
PERL::Session *result = 0 ; PERL::Session *result = 0 ;
SV *foo;
dXSARGS; dXSARGS;
if ((items < 1) || (items > 1)) { if ((items < 1) || (items > 1)) {
@ -8792,8 +8798,18 @@ XS(_wrap_new_Session__SWIG_2) {
} }
arg1 = reinterpret_cast< char * >(buf1); arg1 = reinterpret_cast< char * >(buf1);
result = (PERL::Session *)new PERL::Session(arg1); 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++ ;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
XSRETURN(argvi); XSRETURN(argvi);
fail: fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
@ -8809,6 +8825,7 @@ XS(_wrap_new_Session__SWIG_3) {
int res1 = 0 ; int res1 = 0 ;
int argvi = 0; int argvi = 0;
PERL::Session *result = 0 ; PERL::Session *result = 0 ;
SV *foo;
dXSARGS; dXSARGS;
if ((items < 1) || (items > 1)) { if ((items < 1) || (items > 1)) {
@ -8820,7 +8837,17 @@ XS(_wrap_new_Session__SWIG_3) {
} }
arg1 = reinterpret_cast< switch_core_session_t * >(argp1); arg1 = reinterpret_cast< switch_core_session_t * >(argp1);
result = (PERL::Session *)new PERL::Session(arg1); 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); XSRETURN(argvi);
fail: fail:
@ -8938,7 +8965,6 @@ XS(_wrap_delete_Session) {
void *argp1 = 0 ; void *argp1 = 0 ;
int res1 = 0 ; int res1 = 0 ;
int argvi = 0; int argvi = 0;
SV *foo;
dXSARGS; dXSARGS;
if ((items < 1) || (items > 1)) { if ((items < 1) || (items > 1)) {
@ -8966,7 +8992,6 @@ XS(_wrap_Session_destroy) {
void *argp1 = 0 ; void *argp1 = 0 ;
int res1 = 0 ; int res1 = 0 ;
int argvi = 0; int argvi = 0;
SV *foo;
dXSARGS; dXSARGS;
if ((items < 1) || (items > 1)) { if ((items < 1) || (items > 1)) {