mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
random: Remove useless zend_string
allocation in randomizer_common_init()
(#19007)
This commit is contained in:
parent
51149b65ad
commit
4492a4219a
1 changed files with 1 additions and 8 deletions
|
@ -43,16 +43,9 @@ static inline void randomizer_common_init(php_random_randomizer *randomizer, zen
|
|||
.state = state,
|
||||
};
|
||||
|
||||
zend_string *mname;
|
||||
zend_function *generate_method;
|
||||
|
||||
mname = ZSTR_INIT_LITERAL("generate", 0);
|
||||
generate_method = zend_hash_find_ptr(&engine_object->ce->function_table, mname);
|
||||
zend_string_release(mname);
|
||||
|
||||
/* Create compatible state */
|
||||
state->object = engine_object;
|
||||
state->generate_method = generate_method;
|
||||
state->generate_method = zend_hash_str_find_ptr(&engine_object->ce->function_table, "generate", strlen("generate"));
|
||||
|
||||
/* Mark self-allocated for memory management */
|
||||
randomizer->is_userland_algo = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue