From 675bd1a8c948add29b60b0afbc2d9faa1e0905f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 30 Apr 2024 20:25:16 +0200 Subject: [PATCH] random: Add PHPAPI to all `php_random_algo` definitions The php_random.h header already defines them as `PHPAPI` and they actually are part of the public API. Co-authored-by: Arnaud Le Blanc --- ext/random/engine_combinedlcg.c | 2 +- ext/random/engine_mt19937.c | 2 +- ext/random/engine_pcgoneseq128xslrr64.c | 2 +- ext/random/engine_secure.c | 2 +- ext/random/engine_user.c | 2 +- ext/random/engine_xoshiro256starstar.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/random/engine_combinedlcg.c b/ext/random/engine_combinedlcg.c index 32f9af7d07297..a68f0e3d0cb07 100644 --- a/ext/random/engine_combinedlcg.c +++ b/ext/random/engine_combinedlcg.c @@ -101,7 +101,7 @@ static bool unserialize(void *state, HashTable *data) return true; } -const php_random_algo php_random_algo_combinedlcg = { +PHPAPI const php_random_algo php_random_algo_combinedlcg = { sizeof(php_random_status_state_combinedlcg), generate, range, diff --git a/ext/random/engine_mt19937.c b/ext/random/engine_mt19937.c index 077d3681b0ad4..d44fd7c93b742 100644 --- a/ext/random/engine_mt19937.c +++ b/ext/random/engine_mt19937.c @@ -228,7 +228,7 @@ static bool unserialize(void *state, HashTable *data) return true; } -const php_random_algo php_random_algo_mt19937 = { +PHPAPI const php_random_algo php_random_algo_mt19937 = { sizeof(php_random_status_state_mt19937), generate, range, diff --git a/ext/random/engine_pcgoneseq128xslrr64.c b/ext/random/engine_pcgoneseq128xslrr64.c index 4d288f5793eb7..9ff4f911920b2 100644 --- a/ext/random/engine_pcgoneseq128xslrr64.c +++ b/ext/random/engine_pcgoneseq128xslrr64.c @@ -105,7 +105,7 @@ static bool unserialize(void *state, HashTable *data) return true; } -const php_random_algo php_random_algo_pcgoneseq128xslrr64 = { +PHPAPI const php_random_algo php_random_algo_pcgoneseq128xslrr64 = { sizeof(php_random_status_state_pcgoneseq128xslrr64), generate, range, diff --git a/ext/random/engine_secure.c b/ext/random/engine_secure.c index e55b984693992..0a03a03bdf136 100644 --- a/ext/random/engine_secure.c +++ b/ext/random/engine_secure.c @@ -46,7 +46,7 @@ static zend_long range(void *state, zend_long min, zend_long max) return result; } -const php_random_algo php_random_algo_secure = { +PHPAPI const php_random_algo php_random_algo_secure = { 0, generate, range, diff --git a/ext/random/engine_user.c b/ext/random/engine_user.c index d8c6909d1db8b..e343bc91d4894 100644 --- a/ext/random/engine_user.c +++ b/ext/random/engine_user.c @@ -73,7 +73,7 @@ static zend_long range(void *state, zend_long min, zend_long max) }, min, max); } -const php_random_algo php_random_algo_user = { +PHPAPI const php_random_algo php_random_algo_user = { sizeof(php_random_status_state_user), generate, range, diff --git a/ext/random/engine_xoshiro256starstar.c b/ext/random/engine_xoshiro256starstar.c index fba834ebcd5e2..1a054362f0652 100644 --- a/ext/random/engine_xoshiro256starstar.c +++ b/ext/random/engine_xoshiro256starstar.c @@ -154,7 +154,7 @@ static bool unserialize(void *state, HashTable *data) return true; } -const php_random_algo php_random_algo_xoshiro256starstar = { +PHPAPI const php_random_algo php_random_algo_xoshiro256starstar = { sizeof(php_random_status_state_xoshiro256starstar), generate, range,