[php-src] master: Zend: remove ZEND_RETURN_{VAL|REF|VALUE|REFERENCE} defines (#25078)
| From: | Gina Peter Banyard via GitHub | Date: | Tue, 24 Nov 2026 11:26:36 +0000 |
| Subject: | [php-src] master: Zend: remove ZEND_RETURN_{VAL|REF|VALUE|REFERENCE} defines (#25078) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-144092@lists.php.net to get a copy of this message | ||
Author: Gina Peter Banyard (Girgias)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-11-24T11:26:32Z
Commit: https://github.com/php/php-src/commit/f31f9ce1a0a9a0dbcf987977e8118730f62d4211
Raw diff: https://github.com/php/php-src/commit/f31f9ce1a0a9a0dbcf987977e8118730f62d4211.diff
Zend: remove ZEND_RETURN_{VAL|REF|VALUE|REFERENCE} defines (#25078)
* Zend: remove ZEND_RETURN_{VAL|REF}
As those are unused and seemingly conflict with ZEND_RETURN_{VALUE|REFERENCE}
* Zend: remove ZEND_RETURN_{VALUE|REFERENCE}
As ZEND_RETURN_VALUE is used once in the ZEND_BEGIN_ARG_INFO() macro definition to pass to
ZEND_BEGIN_ARG_INFO_EX().
However every other call to ZEND_BEGIN_ARG_INFO_EX() just uses 0/1 directly.
Changed paths:
M Zend/zend_API.h
M Zend/zend_compile.h
Diff:
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 5239a14530e7..2f2e4adf300c 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -217,7 +217,7 @@ typedef struct _zend_fcall_info_cache {
static const zend_internal_arg_info name[] = { \
{ (const char*)(uintptr_t)(required_num_args),
ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(return_reference, 0, 0)), NULL },
#define ZEND_BEGIN_ARG_INFO(name, _unused) \
- ZEND_BEGIN_ARG_INFO_EX(name, {}, ZEND_RETURN_VALUE, -1)
+ ZEND_BEGIN_ARG_INFO_EX(name, {}, 0, -1)
#define ZEND_END_ARG_INFO() };
/* Name macros */
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index e82d4212116f..a5407422b0bf 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -575,10 +575,6 @@ struct _zend_op_array {
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
-
-#define ZEND_RETURN_VALUE 0
-#define ZEND_RETURN_REFERENCE 1
-
#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value
@@ -1191,9 +1187,6 @@ static zend_always_inline bool zend_check_arg_send_type(const zend_function
*zf,
#define QUICK_ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_PREFER_REF)
-#define ZEND_RETURN_VAL 0
-#define ZEND_RETURN_REF 1
-
#define ZEND_BIND_VAL 0
#define ZEND_BIND_REF 1
#define ZEND_BIND_IMPLICIT 2