[php-src] PR #16142: Generated arginfo header files: replace `sizeof()` with `strlen()`
| From: | DanielEScherzer | Date: | Mon, 30 Sep 2024 19:44:36 +0000 |
| Subject: | [php-src] PR #16142: Generated arginfo header files: replace `sizeof()` with `strlen()` | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-28914@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/16142
Author: DanielEScherzer
The coding conventions call for using
strlen() on constant strings, but not refactoring
existing uses of sizeof() unless there is existing refactoring taking place. I have
recently sent a few patches that refactored/simplified some of the arginfo headers, but this patch
touches more of them.
The generated headers present a special case - until they are updated to use strlen(),
new additions will be forced to use sizeof(), since that is what the generator script
produces. Let's just make the change now.