[php-src] master: random: Add PHPAPI to all `php_random_algo` definitions (#14088)
| From: | Tim Düsterhus via GitHub | Date: | Tue, 30 Apr 2024 19:01:21 +0000 |
| Subject: | [php-src] master: random: Add PHPAPI to all `php_random_algo` definitions (#14088) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-128271@lists.php.net to get a copy of this message | ||
Author: Tim Düsterhus (TimWolla)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2024-04-30T21:01:13+02:00
Commit: https://github.com/php/php-src/commit/d5cc7e91097af6d5625c3da96ff5a461e691ab25
Raw diff: https://github.com/php/php-src/commit/d5cc7e91097af6d5625c3da96ff5a461e691ab25.diff
random: Add PHPAPI to all
php_random_algo definitions (#14088)
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 <arnaud.lb@gmail.com>
Changed paths:
M ext/random/engine_combinedlcg.c
M ext/random/engine_mt19937.c
M ext/random/engine_pcgoneseq128xslrr64.c
M ext/random/engine_secure.c
M ext/random/engine_user.c
M ext/random/engine_xoshiro256starstar.c
Diff:
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,