[php-src] master: zend_alloc trailing 1 calculation helper ZEND_ATTRIBUTE_CONST addition. (#13874)
| From: | David CARLIER via GitHub | Date: | Wed, 03 Apr 2024 12:46:12 +0000 |
| Subject: | [php-src] master: zend_alloc trailing 1 calculation helper ZEND_ATTRIBUTE_CONST addition. (#13874) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-127940@lists.php.net to get a copy of this message | ||
Author: David CARLIER (devnexen)
Committer: GitHub (web-flow)
Pusher: devnexen
Date: 2024-04-03T13:46:07+01:00
Commit: https://github.com/php/php-src/commit/7a3516cca5ad307ca7dcb63224448661f30d623e
Raw diff: https://github.com/php/php-src/commit/7a3516cca5ad307ca7dcb63224448661f30d623e.diff
zend_alloc trailing 1 calculation helper ZEND_ATTRIBUTE_CONST addition. (#13874)
Changed paths:
M Zend/zend_alloc.c
Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 9a884237ae36..09d161e62c16 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -541,7 +541,7 @@ static void *zend_mm_mmap(size_t size)
/***********/
/* number of trailing set (1) bits */
-static zend_always_inline int zend_mm_bitset_nts(zend_mm_bitset bitset)
+ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_mm_bitset_nts(zend_mm_bitset bitset)
{
#if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) && SIZEOF_ZEND_LONG == SIZEOF_LONG
&& defined(PHP_HAVE_BUILTIN_CTZL)
return __builtin_ctzl(~bitset);