[php-src] PR #14595: gen_stub: Intern the parameter name string for named arguments in internal attributes
| From: | TimWolla | Date: | Tue, 18 Jun 2024 12:01:23 +0000 |
| Subject: | [php-src] PR #14595: gen_stub: Intern the parameter name string for named arguments in internal attributes | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-26722@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14595
Author: TimWolla
This is necessary because
zend_get_attribute_object() will use the persistent string
with the parameter name as the index for a newly created non-persistent HashTable, which is not
legal.
As parameter names are expected to be short-ish, reasonably common terms and need to sit around in
memory anyways, we might as well make them an interned string, circumstepping the issue without
needing to duplicate the parameter name into a non-persistent string.
-------------
Found by @Girgias during review of #11293.