Skip to content

Commit ed4537d

Browse files
committed
standard: Use true / false instead of 1 / 0 for bool parameters (2)
Changes done with Coccinelle: @r1@ identifier F; identifier p; typedef bool; type T; parameter list [n1] PL1; parameter list [n2] PL2; @@ T F(PL1, bool p, PL2); @r2@ identifier r1.F; expression list [r1.n1] EL1; expression list [r1.n2] EL2; @@ F(EL1, ( - 1 + true | - 0 + false ) , EL2)
1 parent c32db7e commit ed4537d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/php_string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ PHP_MINIT_FUNCTION(string_intrin);
2929
#endif
3030

3131
#define strnatcmp(a, b) \
32-
strnatcmp_ex(a, strlen(a), b, strlen(b), 0)
32+
strnatcmp_ex(a, strlen(a), b, strlen(b), false)
3333
#define strnatcasecmp(a, b) \
34-
strnatcmp_ex(a, strlen(a), b, strlen(b), 1)
34+
strnatcmp_ex(a, strlen(a), b, strlen(b), true)
3535
PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len, bool is_case_insensitive);
3636
PHPAPI struct lconv *localeconv_r(struct lconv *out);
3737
PHPAPI char *php_strtr(char *str, size_t len, const char *str_from, const char *str_to, size_t trlen);

0 commit comments

Comments
 (0)