Commit ef9c1c307a0 for php
commit ef9c1c307a06c700fb04433f4b54a2aa506180ce
Author: Gina Peter Banyard <girgias@php.net>
Date: Fri Nov 20 15:02:16 2026 +0000
Zend: use bool instead of int type for module_started field
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index fc236b1886e..c19e9d64e26 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2441,7 +2441,7 @@ ZEND_API zend_result zend_startup_module_ex(zend_module_entry *module) /* {{{ */
if (module->module_started) {
return SUCCESS;
}
- module->module_started = 1;
+ module->module_started = true;
/* Check module dependencies */
if (module->deps) {
@@ -2455,7 +2455,7 @@ ZEND_API zend_result zend_startup_module_ex(zend_module_entry *module) /* {{{ */
if (req_mod == NULL || !req_mod->module_started) {
/* TODO: Check version relationship */
zend_error(E_CORE_WARNING, "Cannot load module \"%s\" because required module \"%s\" is not loaded", module->name, dep->name);
- module->module_started = 0;
+ module->module_started = false;
return FAILURE;
}
}
@@ -3389,7 +3389,7 @@ void module_destructor(zend_module_entry *module) /* {{{ */
#endif
}
- module->module_started=0;
+ module->module_started = false;
if (module->type == MODULE_TEMPORARY && module->functions) {
zend_unregister_functions(module->functions, -1, NULL);
/* Clean functions registered separately from module->functions */
diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h
index 13e0009b97e..e4f0fca7ba2 100644
--- a/Zend/zend_modules.h
+++ b/Zend/zend_modules.h
@@ -46,7 +46,7 @@
#define ZEND_MODULE_BUILD_ID "API" ZEND_TOSTR(ZEND_MODULE_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA
#define STANDARD_MODULE_PROPERTIES_EX \
- .module_started = 0, \
+ .module_started = false, \
.type = 0, \
.handle = NULL, \
.module_number = 0, \
@@ -99,7 +99,7 @@ struct _zend_module_entry {
void (*globals_dtor)(void *global);
zend_result (*post_deactivate_func)(void);
void (*child_init_func)(void);
- int module_started;
+ bool module_started;
zend_module_type type;
void *handle;
int module_number;