Skip to content

Commit

Permalink
random: Add PHPAPI to all php_random_algo definitions (#14088)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
TimWolla and arnaud-lb authored Apr 30, 2024
1 parent 8d67f23 commit d5cc7e9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ext/random/engine_combinedlcg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ext/random/engine_mt19937.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ext/random/engine_pcgoneseq128xslrr64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ext/random/engine_secure.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ext/random/engine_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ext/random/engine_xoshiro256starstar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d5cc7e9

Please sign in to comment.