Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2749,23 +2749,15 @@ public function getDeclaration(array $allConstInfos): string
throw new Exception("Constant " . $this->name->__toString() . " must have a @cvalue annotation");
}

$code = "";

if ($this->cond) {
$code .= "#if {$this->cond}\n";
}
// Condition will be added by generateCodeWithConditions()

if ($this->name->isClassConst()) {
$code .= $this->getClassConstDeclaration($value, $allConstInfos);
$code = $this->getClassConstDeclaration($value, $allConstInfos);
} else {
$code .= $this->getGlobalConstDeclaration($value);
$code = $this->getGlobalConstDeclaration($value);
}
$code .= $this->getValueAssertion($value);

if ($this->cond) {
$code .= "#endif\n";
}

return $code;
}

Expand Down Expand Up @@ -3556,9 +3548,11 @@ function (Name $item) {
$code .= "\tzend_register_class_alias(\"" . str_replace("\\", "\\\\", $this->alias) . "\", class_entry);\n";
}

foreach ($this->constInfos as $const) {
$code .= $const->getDeclaration($allConstInfos);
}
$code .= generateCodeWithConditions(
$this->constInfos,
'',
static fn (ConstInfo $const): string => $const->getDeclaration($allConstInfos)
);

foreach ($this->enumCaseInfos as $enumCase) {
$code .= $enumCase->getDeclaration($allConstInfos);
Expand Down Expand Up @@ -5192,9 +5186,11 @@ static function (FuncInfo $funcInfo) use ($fileInfo, &$generatedFunctionDeclarat
$code .= "\nstatic void register_{$stubFilenameWithoutExtension}_symbols(int module_number)\n";
$code .= "{\n";

foreach ($fileInfo->constInfos as $constInfo) {
$code .= $constInfo->getDeclaration($allConstInfos);
}
$code .= generateCodeWithConditions(
$fileInfo->constInfos,
'',
static fn (ConstInfo $constInfo): string => $constInfo->getDeclaration($allConstInfos)
);

if ($attributeInitializationCode !== "" && $fileInfo->constInfos) {
$code .= "\n";
Expand Down
2 changes: 0 additions & 2 deletions ext/com_dotnet/com_extension_arginfo.h

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

158 changes: 0 additions & 158 deletions ext/curl/curl_arginfo.h

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions ext/dba/dba_arginfo.h

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

18 changes: 0 additions & 18 deletions ext/gd/gd_arginfo.h

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

6 changes: 0 additions & 6 deletions ext/intl/listformatter/listformatter_arginfo.h

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

12 changes: 0 additions & 12 deletions ext/intl/spoofchecker/spoofchecker_arginfo.h

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

4 changes: 0 additions & 4 deletions ext/intl/uchar/uchar_arginfo.h

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

Loading