Skip to content

Commit 169bdf6

Browse files
committed
bz2: use C23 enum and pack filter data struct
1 parent 476da42 commit 169bdf6

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

ext/bz2/bz2_filter.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/* {{{ data structure */
2323

24-
enum strm_status {
24+
C23_ENUM(strm_status, uint8_t) {
2525
PHP_BZ2_UNINITIALIZED,
2626
PHP_BZ2_RUNNING,
2727
PHP_BZ2_FINISHED
@@ -34,12 +34,11 @@ typedef struct _php_bz2_filter_data {
3434
size_t inbuf_len;
3535
size_t outbuf_len;
3636

37-
enum strm_status status; /* Decompress option */
38-
unsigned int small_footprint : 1; /* Decompress option */
39-
unsigned int expect_concatenated : 1; /* Decompress option */
40-
unsigned int is_flushed : 1; /* only for compression */
41-
42-
int persistent;
37+
bool persistent;
38+
bool expect_concatenated : 1; /* Decompress option */
39+
bool small_footprint : 1; /* Decompress option */
40+
bool is_flushed : 1; /* only for compression */
41+
strm_status status; /* Decompress option */
4342

4443
/* Configuration for reset - immutable */
4544
int blockSize100k; /* compress only */

0 commit comments

Comments
 (0)