Skip to content

Commit 50da8f0

Browse files
committed
added ARGN to CMakeLists function call and reformatted __NOEXCEPT
1 parent 3ffc0ee commit 50da8f0

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

libc/include/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ macro(add_header_macro TARGET_NAME YAML_FILE DEF_FILE GEN_HDR DEPENDS)
2525
DEF_FILE ${DEF_FILE}
2626
GEN_HDR ${GEN_HDR}
2727
${DEPENDS}
28+
${ARGN}
2829
)
2930
else()
3031
add_gen_header(
3132
${TARGET_NAME}
3233
DEF_FILE ${DEF_FILE}
3334
GEN_HDR ${GEN_HDR}
3435
${DEPENDS}
36+
${ARGN}
3537
)
3638
endif()
3739
endmacro()

libc/newhdrgen/class_implementation/classes/function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __str__(self):
2626
attributes_str = " ".join(self.attributes)
2727
arguments_str = ", ".join(self.arguments)
2828
if attributes_str == "":
29-
result = f"{self.return_type} {self.name}({arguments_str});"
29+
result = f"{self.return_type} {self.name}({arguments_str}) __NOEXCEPT;"
3030
else:
31-
result = f"{attributes_str} {self.return_type} {self.name}({arguments_str})"
31+
result = f"{attributes_str} {self.return_type} {self.name}({arguments_str}) __NOEXCEPT;"
3232
return result

libc/newhdrgen/header.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,24 +60,24 @@ def __str__(self):
6060
current_guard = None
6161
for function in self.functions:
6262
if function.guard == None:
63-
content.append(str(function) + " __NOEXCEPT;")
63+
content.append(str(function))
6464
content.append("")
6565
else:
6666
if current_guard == None:
6767
current_guard = function.guard
6868
content.append(f"#ifdef {current_guard}")
69-
content.append(str(function) + " __NOEXCEPT;")
69+
content.append(str(function))
7070
content.append("")
7171
elif current_guard == function.guard:
72-
content.append(str(function) + " __NOEXCEPT;")
72+
content.append(str(function))
7373
content.append("")
7474
else:
7575
content.pop()
7676
content.append(f"#endif // {current_guard}")
7777
content.append("")
7878
current_guard = function.guard
7979
content.append(f"#ifdef {current_guard}")
80-
content.append(str(function) + " __NOEXCEPT;")
80+
content.append(str(function))
8181
content.append("")
8282
if current_guard != None:
8383
content.pop()

0 commit comments

Comments
 (0)