FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Reduce code bloat in arginfo by using specialised string releases by ndossche · Pull Request #20016 · php/php-src · GitHub

/ php-src Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .h  (58) .php  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
72 changes: 36 additions & 36 deletions Zend/zend_attributes_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Zend/zend_builtin_functions_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions build/gen_stub.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2801,7 +2801,7 @@ private function getClassConstDeclaration(EvaluatedValue $value, array $allConst

$code = "\n" . $zvalCode;

$code .= "\tzend_string *const_{$constName}_name = zend_string_init_interned(\"$constName\", sizeof(\"$constName\") - 1, 1);\n";
$code .= "\tzend_string *const_{$constName}_name = zend_string_init_interned(\"$constName\", sizeof(\"$constName\") - 1, true);\n";
$nameCode = "const_{$constName}_name";

if ($this->exposedDocComment) {
Expand Down Expand Up @@ -2855,7 +2855,7 @@ private function getClassConstDeclaration(EvaluatedValue $value, array $allConst
$code .= "#endif\n";
}

$code .= "\tzend_string_release(const_{$constName}_name);\n";
$code .= "\tzend_string_release_ex(const_{$constName}_name, true);\n";

return $code;
}
Expand Down Expand Up @@ -3058,13 +3058,13 @@ public static function getString(
// Generally strings will not be known
$initFn = $interned ? 'zend_string_init_interned' : 'zend_string_init';
$result = [
"\tzend_string *$varName = $initFn(\"$content\", sizeof(\"$content\") - 1, 1);\n",
"\tzend_string *$varName = $initFn(\"$content\", sizeof(\"$content\") - 1, true);\n",
$varName,
"\tzend_string_release($varName);\n"
"\tzend_string_release_ex($varName, true);\n"
];
// For attribute values that are not freed
if ($varName === '') {
$result[0] = "$initFn(\"$content\", sizeof(\"$content\") - 1, 1);\n";
$result[0] = "$initFn(\"$content\", sizeof(\"$content\") - 1, true);\n";
}
// If not set, use the current latest version
$allVersions = ALL_PHP_VERSION_IDS;
Expand Down
4 changes: 2 additions & 2 deletions ext/bcmath/bcmath_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ext/curl/curl_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

Back | FazBrowse Home | New Git URL