diff options
author | Olly Betts <olly@survex.com> | 2021-03-21 10:57:19 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2021-03-21 10:57:35 +1300 |
commit | 56d74355735f3661406d69d04d89d1bdb4ca96f9 (patch) | |
tree | a3cde5f693308163f12252a31338f211f6f4104c /Examples | |
parent | 34e663a61af13eec62050d2b105ace418929e289 (diff) | |
parent | d18f98c24d9ee0e15457e0e91de2689ad591d1db (diff) | |
download | swig-56d74355735f3661406d69d04d89d1bdb4ca96f9.tar.gz |
Merge branch 'php8-support'
Fixes #1929, Fixes #1978
Diffstat (limited to 'Examples')
-rw-r--r-- | Examples/Makefile.in | 6 | ||||
-rw-r--r-- | Examples/test-suite/director_overload2.i | 4 | ||||
-rw-r--r-- | Examples/test-suite/php/evil_diamond_prop_runme.php | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/Examples/Makefile.in b/Examples/Makefile.in index 3f6140b5e..3978a9598 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -1045,7 +1045,7 @@ ruby_clean: rm -f *.@OBJEXT@ *$(RUBY_SO) ################################################################## -##### PHP7 ###### +##### PHP ###### ################################################################## PHP = @PHP@ @@ -1058,7 +1058,7 @@ PHP_SCRIPT = $(SRCDIR)$(RUNME).php # ------------------------------------------------------------------- php: $(SRCDIR_SRCS) - $(SWIG) -php7 $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH) + $(SWIG) -php $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH) $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(PHP_INCLUDE) $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO) @@ -1067,7 +1067,7 @@ php: $(SRCDIR_SRCS) # -------------------------------------------------------------------- php_cpp: $(SRCDIR_SRCS) - $(SWIG) -php7 -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH) + $(SWIG) -php -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/Examples/test-suite/director_overload2.i b/Examples/test-suite/director_overload2.i index e467c18ce..ddfa65bb4 100644 --- a/Examples/test-suite/director_overload2.i +++ b/Examples/test-suite/director_overload2.i @@ -14,11 +14,15 @@ struct OverloadDerived1 : OverloadBase { virtual void nnn(int vvv) {} #if defined(__SUNPRO_CC) virtual void nnn() {} +#elif defined(SWIGPHP) // FIXME: Hack to stop director_overload2 failing for PHP8 + virtual void nnn() {} #endif }; struct OverloadDerived2 : OverloadBase { #if defined(__SUNPRO_CC) virtual void nnn(int vvv) {} +#elif defined(SWIGPHP) // FIXME: Hack to stop director_overload2 failing for PHP8 + virtual void nnn(int vvv) {} #endif virtual void nnn() {} }; diff --git a/Examples/test-suite/php/evil_diamond_prop_runme.php b/Examples/test-suite/php/evil_diamond_prop_runme.php index 9bdb7435f..645328aff 100644 --- a/Examples/test-suite/php/evil_diamond_prop_runme.php +++ b/Examples/test-suite/php/evil_diamond_prop_runme.php @@ -31,7 +31,7 @@ check::is_a($spam,"spam"); check::equal(1,$spam->_foo,"1==spam->_foo"); check::equal(2,$spam->_bar,"2==spam->_bar"); // multiple inheritance not supported in PHP -set_error_handler(NULL, 0); // Don't complain that _baz is unknown. +set_error_handler(function () {return true;}, E_NOTICE|E_WARNING); // Don't complain that _baz is unknown. check::equal(null,$spam->_baz,"null==spam->_baz"); restore_error_handler(); check::equal(4,$spam->_spam,"4==spam->_spam"); |