Commit 4daefbf9f82 for php.net
commit 4daefbf9f827b4ebf5861d5b1dd557c408764de9
Author: Gina Peter Banyard <girgias@php.net>
Date: Wed Jul 8 16:39:46 2026 +0100
bz2: use C23 enum and pack filter data struct (#22641)
diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c
index 09c49fa7668..ec042a51a3b 100644
--- a/ext/bz2/bz2_filter.c
+++ b/ext/bz2/bz2_filter.c
@@ -21,7 +21,7 @@
/* {{{ data structure */
-enum strm_status {
+C23_ENUM(strm_status, uint8_t) {
PHP_BZ2_UNINITIALIZED,
PHP_BZ2_RUNNING,
PHP_BZ2_FINISHED
@@ -34,12 +34,11 @@ typedef struct _php_bz2_filter_data {
size_t inbuf_len;
size_t outbuf_len;
- enum strm_status status; /* Decompress option */
- unsigned int small_footprint : 1; /* Decompress option */
- unsigned int expect_concatenated : 1; /* Decompress option */
- unsigned int is_flushed : 1; /* only for compression */
-
- int persistent;
+ bool persistent;
+ bool expect_concatenated : 1; /* Decompress option */
+ bool small_footprint : 1; /* Decompress option */
+ bool is_flushed : 1; /* only for compression */
+ strm_status status; /* Decompress option */
/* Configuration for reset - immutable */
int blockSize100k; /* compress only */