Skip to content

Commit 0bc0e31

Browse files
authored
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.
1 parent 3aafc64 commit 0bc0e31

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ PHP 8.6 INTERNALS UPGRADE NOTES
9191
. Functions using zend_forbid_dynamic_call() *must* be flagged with
9292
ZEND_ACC2_FORBID_DYN_CALLS (@forbid-dynamic-calls in stubs). In debug
9393
builds, failing to include that flag will lead to assertion failures.
94+
. The ZEND_RESULT_CODE type has been removed. Use zend_result directly.
9495

9596
========================
9697
2. Build system changes

Zend/zend_types.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@
5454

5555
typedef unsigned char zend_uchar;
5656

57-
typedef enum {
57+
typedef enum zend_result {
5858
SUCCESS = 0,
5959
FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */
60-
} ZEND_RESULT_CODE;
61-
62-
typedef ZEND_RESULT_CODE zend_result;
60+
} zend_result;
6361

6462
/* This constant is deprecated, use SIZE_MAX instead */
6563
#define ZEND_SIZE_MAX SIZE_MAX

0 commit comments

Comments
 (0)