diff --git a/CHANGES.current b/CHANGES.current index 6a372cb56..998d519a0 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,8 +7,10 @@ Version 3.0.11 (in progress) 2016-11-30: olly [PHP] Add support for PHP7. PHP5's C extension API has changed substantially - so you need to use -php7 to specify you want PHP7 compatible wrappers. - Fixes https://github.com/swig/swig/issues/571 + so you need to use -php7 to specify you want PHP7 compatible wrappers. The + default extension for generated wrappers is now .cxx (to match SWIG's default + for every other language - to generate foo_wrap.cpp you can run SWIG with + -cppext cpp). Fixes https://github.com/swig/swig/issues/571 2016-11-28: wsfulton Fix %rename override of wildcard %rename for templates. For example: diff --git a/Doc/Manual/Php.html b/Doc/Manual/Php.html index 1ba950c27..0019968cc 100644 --- a/Doc/Manual/Php.html +++ b/Doc/Manual/Php.html @@ -106,7 +106,12 @@ also contain PHP class wrappers.
SWIG can generate PHP extensions from C++ libraries as well when given the -c++ option. The support for C++ is discussed in -more detail in section 27.2.6. +more detail in section 27.2.6. The generated +C++ wrapper will be called example_wrap.cpp (for PHP5) or +example_wrap.cxx (for PHP7 where the default has been changed to align +with SWIG's default for every other language). You can specify a +different extension for the C++ wrapper using -cppext - +e.g. if you want example_wrap.cc use -cppext cc.
diff --git a/Doc/Manual/SWIG.html b/Doc/Manual/SWIG.html
index 77481f279..0e392a918 100644
--- a/Doc/Manual/SWIG.html
+++ b/Doc/Manual/SWIG.html
@@ -145,7 +145,7 @@ can be obtained by typing swig -help or swig
-c++ Enable C++ parsing
-cppext ext Change file extension of C++ generated files to ext
- (default is cxx, except for PHP which uses cpp)
+ (default is cxx, except for PHP5 which uses cpp)
-Dsymbol Define a preprocessor symbol
-Fstandard Display error/warning messages in commonly used format
-Fmicrosoft Display error/warning messages in Microsoft format
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index d10f0f9a2..d43b2c55d 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -1188,7 +1188,7 @@ php: $(SRCDIR_SRCS)
# --------------------------------------------------------------------
php_cpp: $(SRCDIR_SRCS)
- $(SWIG) -php7 -cppext cxx -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(SWIG) -php7 -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
$(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP_INCLUDE)
$(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index 632a001ac..12b83b2e4 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -64,7 +64,7 @@ static const char *usage1 = (const char *) "\
-copyctor - Automatically generate copy constructors wherever possible\n\
-cpperraswarn - Treat the preprocessor #error statement as #warning (default)\n\
-cppext