summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2023-04-20 13:40:00 +1200
committerOlly Betts <olly@survex.com>2023-04-20 13:45:30 +1200
commit9873ff107af2f9dea05ddb9a48b9c2d7abbfd5dc (patch)
tree1c58c8e505270638ab329004f50b729305a2b474 /Lib
parenta5e025e22afa8c808349a759fdaba3f23ac6bee4 (diff)
downloadswig-9873ff107af2f9dea05ddb9a48b9c2d7abbfd5dc.tar.gz
Remove remaining traces of PHP7 support
The bulk of this was already removed in e3b112c69ceed5c39cb07fa45a3ba62b27712679.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/exception.i7
-rw-r--r--Lib/php/phpinterfaces.i6
2 files changed, 3 insertions, 10 deletions
diff --git a/Lib/exception.i b/Lib/exception.i
index 5cdea58e8..665e24b7e 100644
--- a/Lib/exception.i
+++ b/Lib/exception.i
@@ -14,14 +14,9 @@
#ifdef SWIGPHP
%{
-#if PHP_MAJOR_VERSION >= 8
-# define SWIG_HANDLE_VALUE_ERROR_FOR_PHP8(code) code == SWIG_ValueError ? zend_ce_value_error :
-#else
-# define SWIG_HANDLE_VALUE_ERROR_FOR_PHP8(code)
-#endif
#define SWIG_exception(code, msg) do { zend_throw_exception( \
code == SWIG_TypeError ? zend_ce_type_error : \
- SWIG_HANDLE_VALUE_ERROR_FOR_PHP8(code) \
+ code == SWIG_ValueError ? zend_ce_value_error : \
code == SWIG_DivisionByZero ? zend_ce_division_by_zero_error : \
code == SWIG_SyntaxError ? zend_ce_parse_error : \
code == SWIG_OverflowError ? zend_ce_arithmetic_error : \
diff --git a/Lib/php/phpinterfaces.i b/Lib/php/phpinterfaces.i
index 5b1da8b79..e1029b645 100644
--- a/Lib/php/phpinterfaces.i
+++ b/Lib/php/phpinterfaces.i
@@ -54,9 +54,7 @@
#define SWIG_PHP_INTERFACE_JsonSerializable_HEADER "ext/json/php_json.h"
// New in PHP 8.0.
-#if PHP_MAJOR_VERSION >= 8
-# define SWIG_PHP_INTERFACE_Stringable_CE zend_ce_stringable
-# define SWIG_PHP_INTERFACE_Stringable_HEADER "zend_interfaces.h"
-#endif
+#define SWIG_PHP_INTERFACE_Stringable_CE zend_ce_stringable
+#define SWIG_PHP_INTERFACE_Stringable_HEADER "zend_interfaces.h"
%}