Skip to content

Commit

Permalink
Indent with TAB in .h files generated by gen_stub
Browse files Browse the repository at this point in the history
  • Loading branch information
adoy committed Jun 13, 2022
1 parent e7f6acd commit 6fd2b39
Show file tree
Hide file tree
Showing 26 changed files with 650 additions and 650 deletions.
32 changes: 16 additions & 16 deletions Zend/zend_constants_arginfo.h

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

24 changes: 12 additions & 12 deletions build/gen_stub.php
Expand Up @@ -1381,7 +1381,7 @@ public function getOptimizerInfo(): ?string {
return null;
}

return " F" . $this->return->refcount . '("' . $this->name->__toString() . '", ' . $type->toOptimizerTypeMask() . "),\n";
return "\tF" . $this->return->refcount . '("' . $this->name->__toString() . '", ' . $type->toOptimizerTypeMask() . "),\n";
}

public function discardInfoForOldPhpVersions(): void {
Expand Down Expand Up @@ -1918,23 +1918,23 @@ private function getGlobalConstDeclaration(EvaluatedValue $value, iterable $allC
$flags .= " | CONST_DEPRECATED";
}
if ($value->type->isNull()) {
return " REGISTER_NULL_CONSTANT(\"$constName\", $flags);\n";
return "\tREGISTER_NULL_CONSTANT(\"$constName\", $flags);\n";
}

if ($value->type->isBool()) {
return " REGISTER_BOOL_CONSTANT(\"$constName\", " . ($cConstValue ?: ($constValue ? "true" : "false")) . ", $flags);\n";
return "\tREGISTER_BOOL_CONSTANT(\"$constName\", " . ($cConstValue ?: ($constValue ? "true" : "false")) . ", $flags);\n";
}

if ($value->type->isInt()) {
return " REGISTER_LONG_CONSTANT(\"$constName\", " . ($cConstValue ?: (int) $constValue) . ", $flags);\n";
return "\tREGISTER_LONG_CONSTANT(\"$constName\", " . ($cConstValue ?: (int) $constValue) . ", $flags);\n";
}

if ($value->type->isFloat()) {
return " REGISTER_DOUBLE_CONSTANT(\"$constName\", " . ($cConstValue ?: (float) $constValue) . ", $flags);\n";
return "\tREGISTER_DOUBLE_CONSTANT(\"$constName\", " . ($cConstValue ?: (float) $constValue) . ", $flags);\n";
}

if ($value->type->isString()) {
return " REGISTER_STRING_CONSTANT(\"$constName\", " . ($cConstValue ?: '"' . addslashes($constValue) . '"') . ", $flags);\n";
return "\tREGISTER_STRING_CONSTANT(\"$constName\", " . ($cConstValue ?: '"' . addslashes($constValue) . '"') . ", $flags);\n";
}

throw new Exception("Unimplemented constant type");}
Expand Down Expand Up @@ -1969,27 +1969,27 @@ private function getValueAssertion(EvaluatedValue $value): string
$constValue = $value->value;

if ($value->type->isNull()) {
return " ZEND_ASSERT($cName == NULL);\n";
return "\tZEND_ASSERT($cName == NULL);\n";
}

if ($value->type->isBool()) {
$cValue = $constValue ? "true" : "false";
return " ZEND_ASSERT($cName == $cValue);\n";
return "\tZEND_ASSERT($cName == $cValue);\n";
}

if ($value->type->isInt()) {
$cValue = (int) $constValue;
return " ZEND_ASSERT($cName == $cValue);\n";
return "\tZEND_ASSERT($cName == $cValue);\n";
}

if ($value->type->isFloat()) {
$cValue = (float) $constValue;
return " ZEND_ASSERT($cName == $cValue);\n";
return "\tZEND_ASSERT($cName == $cValue);\n";
}

if ($value->type->isString()) {
$cValue = '"' . addslashes($constValue) . '"';
return " ZEND_ASSERT(strcmp($cName, $cValue) == 0);\n";
return "\tZEND_ASSERT(strcmp($cName, $cValue) == 0);\n";
}

throw new Exception("Unimplemented constant type");
Expand Down Expand Up @@ -3777,7 +3777,7 @@ static function (FuncInfo $funcInfo) use (&$classEntriesWithSensitiveParams) {
$functionTable = "CG(function_table)";
}

$code .= " zend_mark_function_parameter_as_sensitive($functionTable, \"" . $funcInfo->name->getNameForAttributes() . "\", $index);\n";
$code .= "\tzend_mark_function_parameter_as_sensitive($functionTable, \"" . $funcInfo->name->getNameForAttributes() . "\", $index);\n";
}

return $code;
Expand Down
42 changes: 21 additions & 21 deletions ext/calendar/calendar_arginfo.h

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

108 changes: 54 additions & 54 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.

4 comments on commit 6fd2b39

@iluuu1994
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently not all stubs were updated, thus the build is failing. Can you re-run the stubs generator? /cc @kocsismate

@kocsismate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops, yes, sure!

@kocsismate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I was a lit late :) The issue seems to be fixed

@iluuu1994
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I was a minute early 🙂 @adoy Thanks for fixing!

Please sign in to comment.