Skip to content

Commit a967a12

Browse files
committed
Replace remaining uses of static restrict with PHP_STATIC_RESTRICT
1 parent d3eac45 commit a967a12

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ext/hash/hash_sha_ni.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@
3333

3434
# if ZEND_INTRIN_SHA_RESOLVER
3535
static __m128i be32dec_128(const uint8_t * src) __attribute__((target("ssse3")));
36-
void SHA256_Transform_shani(uint32_t state[static restrict 8], const uint8_t block[static restrict 64]) __attribute__((target("ssse3,sha")));
36+
void SHA256_Transform_shani(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64]) __attribute__((target("ssse3,sha")));
3737
# endif
3838

39-
/* Original implementation from libcperciva follows. */
39+
/* Original implementation from libcperciva follows.
40+
*
41+
* Modified to use `PHP_STATIC_RESTRICT` for MSVC compatibility.
42+
*/
4043

4144
/**
4245
* This code uses intrinsics from the following feature sets:
@@ -110,8 +113,8 @@ be32dec_128(const uint8_t * src)
110113
* are defined and cpusupport_x86_shani() and _ssse3() return nonzero.
111114
*/
112115
void
113-
SHA256_Transform_shani(uint32_t state[static restrict 8],
114-
const uint8_t block[static restrict 64])
116+
SHA256_Transform_shani(uint32_t state[PHP_STATIC_RESTRICT 8],
117+
const uint8_t block[PHP_STATIC_RESTRICT 64])
115118
{
116119
__m128i S3210, S7654;
117120
__m128i S0123, S4567;

0 commit comments

Comments
 (0)