Skip to content

Commit e733ebf

Browse files
committed
Add parenthesis around preprocessor conditions in stubs
gen_stub.php concatenates nested #ifs into one #if so let's make sure the semantics remain the same.
1 parent cfa72ff commit e733ebf

12 files changed

+102
-102
lines changed

ext/imap/php_imap.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ function imap_thread(IMAP\Connection $imap, int $flags = SE_FREE): array|false {
551551

552552
function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
553553

554-
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
554+
#if (defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001))
555555
function imap_get_quota(IMAP\Connection $imap, string $quota_root): array|false {}
556556

557557
function imap_get_quotaroot(IMAP\Connection $imap, string $mailbox): array|false {}

ext/imap/php_imap_arginfo.h

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/ldap/ldap.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ function ldap_parse_result(LDAP\Connection $ldap, LDAP\Result $result, &$error_c
751751
#endif
752752
#endif
753753

754-
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
754+
#if (defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC))
755755
function ldap_set_rebind_proc(LDAP\Connection $ldap, ?callable $callback): bool {}
756756
#endif
757757

ext/ldap/ldap_arginfo.h

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/odbc/odbc.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
*/
216216
const SQL_TIMESTAMP = UNKNOWN;
217217

218-
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
218+
#if (defined(ODBCVER) && (ODBCVER >= 0x0300))
219219
/**
220220
* @var int
221221
* @cvalue SQL_TYPE_DATE

ext/odbc/odbc_arginfo.h

+18-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/sockets/sockets.stub.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@
15881588
const SOL_LOCAL = UNKNOWN;
15891589
#endif
15901590

1591-
#if defined(IPV6_RECVPKTINFO) && HAVE_IPV6
1591+
#if (defined(IPV6_RECVPKTINFO) && HAVE_IPV6)
15921592
/**
15931593
* IPv6 ancillary data
15941594
* @var int
@@ -1601,7 +1601,7 @@
16011601
*/
16021602
const IPV6_PKTINFO = UNKNOWN;
16031603
#endif
1604-
#if defined(IPV6_RECVHOPLIMIT) && HAVE_IPV6
1604+
#if (defined(IPV6_RECVHOPLIMIT) && HAVE_IPV6)
16051605
/**
16061606
* @var int
16071607
* @cvalue IPV6_RECVHOPLIMIT
@@ -1614,7 +1614,7 @@
16141614
const IPV6_HOPLIMIT = UNKNOWN;
16151615
#endif
16161616

1617-
#if defined(IPV6_RECVTCLASS) && HAVE_IPV6
1617+
#if (defined(IPV6_RECVTCLASS) && HAVE_IPV6)
16181618
/**
16191619
* @var int
16201620
* @cvalue IPV6_RECVTCLASS

ext/sockets/sockets_arginfo.h

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/standard/basic_functions.stub.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ function gethostbyname(string $hostname): string {}
13401340
*/
13411341
function gethostbynamel(string $hostname): array|false {}
13421342

1343-
#if defined(PHP_WIN32) || defined(HAVE_DNS_SEARCH_FUNC)
1343+
#if (defined(PHP_WIN32) || defined(HAVE_DNS_SEARCH_FUNC))
13441344
function dns_check_record(string $hostname, string $type = "MX"): bool {}
13451345

13461346
/** @alias dns_check_record */
@@ -1370,7 +1370,7 @@ function getmxrr(string $hostname, &$hosts, &$weights = null): bool {}
13701370

13711371
/* net.c */
13721372

1373-
#if defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__)
1373+
#if (defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__))
13741374
function net_get_interfaces(): array|false {}
13751375
#endif
13761376

@@ -1769,7 +1769,7 @@ function closedir($dir_handle = null): void {}
17691769

17701770
function chdir(string $directory): bool {}
17711771

1772-
#if defined(HAVE_CHROOT) && !defined(ZTS) && defined(ENABLE_CHROOT_FUNC)
1772+
#if (defined(HAVE_CHROOT) && !defined(ZTS) && defined(ENABLE_CHROOT_FUNC))
17731773
function chroot(string $directory): bool {}
17741774
#endif
17751775

@@ -2186,7 +2186,7 @@ function levenshtein(string $string1, string $string2, int $insertion_cost = 1,
21862186

21872187
/* link.c */
21882188

2189-
#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
2189+
#if (defined(HAVE_SYMLINK) || defined(PHP_WIN32))
21902190
/** @refcount 1 */
21912191
function readlink(string $path): string|false {}
21922192

@@ -2590,7 +2590,7 @@ function sapi_windows_vt100_support($stream, ?bool $enable = null): bool {}
25902590
/** @param resource $stream */
25912591
function stream_set_chunk_size($stream, int $size): int {}
25922592

2593-
#if defined(HAVE_SYS_TIME_H) || defined(PHP_WIN32)
2593+
#if (defined(HAVE_SYS_TIME_H) || defined(PHP_WIN32))
25942594
/** @param resource $stream */
25952595
function stream_set_timeout($stream, int $seconds, int $microseconds = 0): bool {}
25962596

0 commit comments

Comments
 (0)