Skip to content

Commit e35b381

Browse files
committed
zend_ini: use bool type instead of int type
1 parent 9c900b6 commit e35b381

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

Zend/zend_ini.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ ZEND_API zend_result zend_alter_ini_entry_chars(zend_string *name, const char *v
348348
}
349349
/* }}} */
350350

351-
ZEND_API zend_result zend_alter_ini_entry_chars_ex(zend_string *name, const char *value, size_t value_length, int modify_type, int stage, int force_change) /* {{{ */
351+
ZEND_API zend_result zend_alter_ini_entry_chars_ex(zend_string *name, const char *value, size_t value_length, int modify_type, int stage, bool force_change) /* {{{ */
352352
{
353353
zend_result ret;
354354
zend_string *new_value;
@@ -457,7 +457,7 @@ ZEND_API zend_result zend_ini_register_displayer(const char *name, uint32_t name
457457
* Data retrieval
458458
*/
459459

460-
ZEND_API zend_long zend_ini_long(const char *name, size_t name_length, int orig) /* {{{ */
460+
ZEND_API zend_long zend_ini_long(const char *name, size_t name_length, bool orig) /* {{{ */
461461
{
462462
zend_ini_entry *ini_entry;
463463

@@ -474,7 +474,7 @@ ZEND_API zend_long zend_ini_long(const char *name, size_t name_length, int orig)
474474
}
475475
/* }}} */
476476

477-
ZEND_API double zend_ini_double(const char *name, size_t name_length, int orig) /* {{{ */
477+
ZEND_API double zend_ini_double(const char *name, size_t name_length, bool orig) /* {{{ */
478478
{
479479
zend_ini_entry *ini_entry;
480480

@@ -491,15 +491,15 @@ ZEND_API double zend_ini_double(const char *name, size_t name_length, int orig)
491491
}
492492
/* }}} */
493493

494-
ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, int orig, bool *exists) /* {{{ */
494+
ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, bool orig, bool *exists) /* {{{ */
495495
{
496496
zend_string *str = zend_ini_str_ex(name, name_length, orig, exists);
497497

498498
return str ? ZSTR_VAL(str) : NULL;
499499
}
500500
/* }}} */
501501

502-
ZEND_API char *zend_ini_string(const char *name, size_t name_length, int orig) /* {{{ */
502+
ZEND_API char *zend_ini_string(const char *name, size_t name_length, bool orig) /* {{{ */
503503
{
504504
zend_string *str = zend_ini_str(name, name_length, orig);
505505

@@ -886,7 +886,7 @@ ZEND_API zend_ulong zend_ini_parse_uquantity_warn(zend_string *value, zend_strin
886886

887887
ZEND_INI_DISP(zend_ini_boolean_displayer_cb) /* {{{ */
888888
{
889-
int value;
889+
bool value;
890890
zend_string *tmp_value;
891891

892892
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
@@ -900,7 +900,7 @@ ZEND_INI_DISP(zend_ini_boolean_displayer_cb) /* {{{ */
900900
if (tmp_value) {
901901
value = zend_ini_parse_bool(tmp_value);
902902
} else {
903-
value = 0;
903+
value = false;
904904
}
905905

906906
if (value) {

Zend/zend_ini.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ ZEND_API void zend_ini_refresh_caches(int stage);
8282
ZEND_API zend_result zend_alter_ini_entry(zend_string *name, zend_string *new_value, int modify_type, int stage);
8383
ZEND_API zend_result zend_alter_ini_entry_ex(zend_string *name, zend_string *new_value, int modify_type, int stage, bool force_change);
8484
ZEND_API zend_result zend_alter_ini_entry_chars(zend_string *name, const char *value, size_t value_length, int modify_type, int stage);
85-
ZEND_API zend_result zend_alter_ini_entry_chars_ex(zend_string *name, const char *value, size_t value_length, int modify_type, int stage, int force_change);
85+
ZEND_API zend_result zend_alter_ini_entry_chars_ex(zend_string *name, const char *value, size_t value_length, int modify_type, int stage, bool force_change);
8686
ZEND_API zend_result zend_restore_ini_entry(zend_string *name, int stage);
8787
ZEND_API void display_ini_entries(zend_module_entry *module);
8888

89-
ZEND_API zend_long zend_ini_long(const char *name, size_t name_length, int orig);
90-
ZEND_API double zend_ini_double(const char *name, size_t name_length, int orig);
91-
ZEND_API char *zend_ini_string(const char *name, size_t name_length, int orig);
92-
ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, int orig, bool *exists);
89+
ZEND_API zend_long zend_ini_long(const char *name, size_t name_length, bool orig);
90+
ZEND_API double zend_ini_double(const char *name, size_t name_length, bool orig);
91+
ZEND_API char *zend_ini_string(const char *name, size_t name_length, bool orig);
92+
ZEND_API char *zend_ini_string_ex(const char *name, size_t name_length, bool orig, bool *exists);
9393
ZEND_API zend_string *zend_ini_str(const char *name, size_t name_length, bool orig);
9494
ZEND_API zend_string *zend_ini_str_ex(const char *name, size_t name_length, bool orig, bool *exists);
9595
ZEND_API zend_string *zend_ini_get_value(zend_string *name);

0 commit comments

Comments
 (0)