[php-src] master: bz2: use C23 enum and pack filter data struct (#22641)

Gina Peter Banyard via GitHub <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Gina Peter Banyard (Girgias)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-07-08T16:39:46+01:00

Commit: https://github.com/php/php-src/commit/4daefbf9f827b4ebf5861d5b1dd557c408764de9
Raw diff: https://github.com/php/php-src/commit/4daefbf9f827b4ebf5861d5b1dd557c408764de9.diff

bz2: use C23 enum and pack filter data struct (#22641)

Changed paths:
  M  ext/bz2/bz2_filter.c


Diff:

diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c
index 09c49fa76687..ec042a51a3b2 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 */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.