]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
--resolve ESL-72 fix const char* vs char* issue in swig
authorKen Rice <krice@freeswitch.org>
Fri, 20 Sep 2013 19:58:44 +0000 (14:58 -0500)
committerKen Rice <krice@freeswitch.org>
Fri, 20 Sep 2013 19:58:44 +0000 (14:58 -0500)
libs/esl/php/Makefile
libs/esl/php/esl_wrap.cpp

index dce8fd4bd1f86bdbd9333cf17e5032eaae8f06f8..97674f85bef3c08745a4e86dcb35a3df25d66abd 100644 (file)
@@ -17,6 +17,7 @@ all: ESL.so
 
 esl_wrap.cpp:
        swig -module ESL -php5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i
+       sed -e 's/  char \*type_name;/  const char \*type_name;/' -i esl_wrap.cpp
 
 esl_wrap.o: esl_wrap.cpp
        $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) $(WRAP_GCC_WARNING_SILENCE) -c esl_wrap.cpp -o esl_wrap.o
index 8c91f254526630877111ce456f675210fc605020..0389cc2151e2c8877456759a2dd5781d41bbf9ba 100644 (file)
@@ -857,7 +857,7 @@ SWIG_ZTS_ConvertResourcePtr(zval *z, swig_type_info *ty, int flags TSRMLS_DC) {
   swig_object_wrapper *value;
   void *p;
   int type;
-  char *type_name;
+  const char *type_name;
 
   value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type);
   if ( flags && SWIG_POINTER_DISOWN ) {