[libc] Fix hdrgen output for no-argument functions (#123245)

The hdrgen output is C, not C++.
This commit is contained in:
Roland McGrath
2025-01-16 19:20:53 -08:00
committed by GitHub
parent 1fa02b9684
commit 906cbbbd3c
2 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ class Function:
def __str__(self):
attributes_str = " ".join(self.attributes)
arguments_str = ", ".join(self.arguments)
arguments_str = ", ".join(self.arguments) if self.arguments else "void"
if attributes_str == "":
result = f"{self.return_type} {self.name}({arguments_str})"
else:

View File

@@ -28,10 +28,10 @@ enum {
__BEGIN_C_DECLS
CONST_FUNC_A void func_a() __NOEXCEPT;
CONST_FUNC_A void func_a(void) __NOEXCEPT;
#ifdef LIBC_TYPES_HAS_FLOAT128
float128 func_b() __NOEXCEPT;
float128 func_b(void) __NOEXCEPT;
#endif // LIBC_TYPES_HAS_FLOAT128
#ifdef LIBC_TYPES_HAS_FLOAT16