From 33b1740908d2b665c09b9c4c9225fa829e15c573 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 6 Sep 2023 21:49:12 +0200 Subject: [PATCH] Remove DOM_NO_ARGS() and DOM_NOT_IMPLEMENTED() DOM_NO_ARGS() has no users. DOM_NOT_IMPLEMENTED() has a single user. --- UPGRADING.INTERNALS | 1 + ext/dom/domimplementation.c | 3 ++- ext/dom/php_dom.h | 9 --------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index e605e15e3c52..c4ee1db4c769 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -25,6 +25,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES a. ext/dom - dom_read_t and dom_write_t now expect the function to return zend_result instead of int. + - The macros DOM_NO_ARGS() and DOM_NOT_IMPLEMENTED() have been removed. ======================== 4. OpCode changes diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index c9c5767fe3be..64432fc3da3e 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -227,7 +227,8 @@ PHP_METHOD(DOMImplementation, getFeature) RETURN_THROWS(); } - DOM_NOT_IMPLEMENTED(); + zend_throw_error(NULL, "Not yet implemented"); + RETURN_THROWS(); } /* }}} end dom_domimplementation_get_feature */ diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index 4d415256788a..ee7773bb08e3 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -188,15 +188,6 @@ int php_dom_get_nodelist_length(dom_object *obj); __ptr = (__prtype)((php_libxml_node_ptr *)__intern->ptr)->node; \ } -#define DOM_NO_ARGS() \ - if (zend_parse_parameters_none() == FAILURE) { \ - RETURN_THROWS(); \ - } - -#define DOM_NOT_IMPLEMENTED() \ - zend_throw_error(NULL, "Not yet implemented"); \ - RETURN_THROWS(); - #define DOM_NODELIST 0 #define DOM_NAMEDNODEMAP 1