Commit 0bc0e310e7a for php.net
commit 0bc0e310e7aec951987fde59b7e8a4e6e7644c72
Author: Tim Düsterhus <tim@tideways-gmbh.com>
Date: Thu Apr 23 18:01:26 2026 +0200
zend_types: Remove `ZEND_RESULT_CODE` typedef (#21850)
This simplifies the definition of `zend_result`, since it's no longer a
multilayered `typedef` of an anonymous enum.
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index 1d53df7e4a3..10c71d19a56 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -91,6 +91,7 @@ PHP 8.6 INTERNALS UPGRADE NOTES
. Functions using zend_forbid_dynamic_call() *must* be flagged with
ZEND_ACC2_FORBID_DYN_CALLS (@forbid-dynamic-calls in stubs). In debug
builds, failing to include that flag will lead to assertion failures.
+ . The ZEND_RESULT_CODE type has been removed. Use zend_result directly.
========================
2. Build system changes
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index dc6ea2c800e..30d77da6732 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -54,12 +54,10 @@
typedef unsigned char zend_uchar;
-typedef enum {
+typedef enum zend_result {
SUCCESS = 0,
FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */
-} ZEND_RESULT_CODE;
-
-typedef ZEND_RESULT_CODE zend_result;
+} zend_result;
/* This constant is deprecated, use SIZE_MAX instead */
#define ZEND_SIZE_MAX SIZE_MAX