]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10427: move mod_perl to use swig3.0 so we can reswig on debian9
authorMike Jerris <mike@jerris.com>
Tue, 27 Jun 2017 17:32:17 +0000 (12:32 -0500)
committerMike Jerris <mike@jerris.com>
Tue, 27 Jun 2017 17:32:17 +0000 (12:32 -0500)
src/mod/languages/mod_perl/Makefile.am
src/mod/languages/mod_perl/freeswitch.pm
src/mod/languages/mod_perl/mod_perl_wrap.cpp

index 4c63a81bd040198b3c9d34a7f93fb68b85b72b74..c1be5d68395b4b62b8f083a6347bb36c4af28f72 100644 (file)
@@ -23,7 +23,7 @@ swigclean: clean
        rm -f mod_perl_wrap.* freeswitch.so freeswitch.pm
 
 mod_perl_wrap.cpp:
-       swig2.0 -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
+       swig3.0 -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
        echo "#include \"mod_perl_extra.c\"" >> mod_perl_wrap.cpp
        patch -s -p0 -i hack.diff
 
index 1496b314256c97499b620a93241fbd60ad00b608..d2c7b02f3962c58a12c157dfa474eb47e3e665bf 100644 (file)
@@ -1,5 +1,5 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.12
+# Version 3.0.2
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
index 1cfd61c91b7c28149bf288b6d907bfd412153029..fe0e3ee73ecd34b41aa327f5950e84930443b3fc 100644 (file)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.12
+ * Version 3.0.2
  *
  * This file is not intended to be easily readable and contains a number of
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -550,14 +550,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
   swig_module_info *iter = start;
   do {
     if (iter->size) {
-      register size_t l = 0;
-      register size_t r = iter->size - 1;
+      size_t l = 0;
+      size_t r = iter->size - 1;
       do {
        /* since l+r >= 0, we can (>> 1) instead (/ 2) */
-       register size_t i = (l + r) >> 1;
+       size_t i = (l + r) >> 1;
        const char *iname = iter->types[i]->name;
        if (iname) {
-         register int compare = strcmp(name, iname);
+         int compare = strcmp(name, iname);
          if (compare == 0) {
            return iter->types[i];
          } else if (compare < 0) {
@@ -601,7 +601,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
        of the str field (the human readable name) */
     swig_module_info *iter = start;
     do {
-      register size_t i = 0;
+      size_t i = 0;
       for (; i < iter->size; ++i) {
        if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
          return iter->types[i];
@@ -620,10 +620,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
 SWIGRUNTIME char *
 SWIG_PackData(char *c, void *ptr, size_t sz) {
   static const char hex[17] = "0123456789abcdef";
-  register const unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu =  u + sz;
+  const unsigned char *u = (unsigned char *) ptr;
+  const unsigned char *eu =  u + sz;
   for (; u != eu; ++u) {
-    register unsigned char uu = *u;
+    unsigned char uu = *u;
     *(c++) = hex[(uu & 0xf0) >> 4];
     *(c++) = hex[uu & 0xf];
   }
@@ -635,11 +635,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
 */
 SWIGRUNTIME const char *
 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
-  register unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu = u + sz;
+  unsigned char *u = (unsigned char *) ptr;
+  const unsigned char *eu = u + sz;
   for (; u != eu; ++u) {
-    register char d = *(c++);
-    register unsigned char uu;
+    char d = *(c++);
+    unsigned char uu;
     if ((d >= '0') && (d <= '9'))
       uu = ((d - '0') << 4);
     else if ((d >= 'a') && (d <= 'f'))
@@ -894,6 +894,7 @@ SWIG_Perl_ErrorType(int code) {
 #define SWIG_ConvertPtr(obj, pp, type, flags)           SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
 #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
 #define SWIG_NewPointerObj(p, type, flags)              SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
+#define swig_owntype                                    int
 
 /* for raw packed data */
 #define SWIG_ConvertPacked(obj, p, s, type)             SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
@@ -1162,7 +1163,11 @@ SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_
     /* Now see if the types match */
     char *_c = HvNAME(SvSTASH(SvRV(sv)));
     tc = SWIG_TypeProxyCheck(_c,_t);
+#ifdef SWIG_DIRECTORS
+    if (!tc && !sv_derived_from(sv,SWIG_Perl_TypeProxyName(_t))) {
+#else
     if (!tc) {
+#endif
       return SWIG_ERROR;
     }
     {
@@ -1544,7 +1549,7 @@ static swig_module_info swig_module = {swig_types, 29, 0, 0, 0, 0};
 #define SWIG_name   "freeswitchc::boot_freeswitch"
 #define SWIG_prefix "freeswitchc::"
 
-#define SWIGVERSION 0x02001
+#define SWIGVERSION 0x03000
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -1822,7 +1827,8 @@ SWIG_AsCharArray(SV * obj, char *val, size_t size)
   char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
   int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
   if (SWIG_IsOK(res)) {
-    if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
+    /* special case of single char conversion when we don't need space for NUL */
+    if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize;
     if (csize <= size) {
       if (val) {
        if (csize) memcpy(val, cptr, csize*sizeof(char));
@@ -4819,7 +4825,7 @@ XS(_wrap_EventConsumer_enodes_set) {
     {
       if (arg2) {
         size_t ii = 0;
-        for (; ii < (size_t)SWITCH_EVENT_ALL+1; ++ii) arg1->enodes[ii] = arg2[ii];
+        for (; ii < (size_t)SWITCH_EVENT_ALL+1; ++ii) *(switch_event_node_t * *)&arg1->enodes[ii] = *((switch_event_node_t * *)arg2 + ii);
       } else {
         SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""enodes""' of type '""switch_event_node_t *[SWITCH_EVENT_ALL+1]""'");
       }
@@ -10549,7 +10555,7 @@ static swig_command_info swig_commands[] = {
  * array with the correct data and linking the correct swig_cast_info
  * structures together.
  *
- * The generated swig_type_info structures are assigned staticly to an initial
+ * The generated swig_type_info structures are assigned statically to an initial
  * array. We just loop through that array, and handle each type individually.
  * First we lookup if this type has been already loaded, and if so, use the
  * loaded structure instead of the generated one. Then we have to fill in the
@@ -10834,17 +10840,17 @@ XS(SWIG_init) {
   SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
   SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
   SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
-  /*@SWIG:/usr/share/swig2.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
+  /*@SWIG:/usr/share/swig3.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
     SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
     SvREADONLY_on(sv);
   } while(0) /*@SWIG@*/;
-  /*@SWIG:/usr/share/swig2.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
+  /*@SWIG:/usr/share/swig3.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
     SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
     SvREADONLY_on(sv);
   } while(0) /*@SWIG@*/;
-  /*@SWIG:/usr/share/swig2.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
+  /*@SWIG:/usr/share/swig3.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
     SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
     SvREADONLY_on(sv);