mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
dist/tools/headerguards: revert 082a37b
With the migration to #pragma once in the core header in #21405, the workaround for the header name check when using #include_next is not necessary anymore and can be dropped.
This commit is contained in:
parent
9e06d82a6b
commit
193b5e1a91
4
dist/tools/headerguards/headerguards.py
vendored
4
dist/tools/headerguards/headerguards.py
vendored
@ -44,7 +44,6 @@ def fix_headerguard(filename):
|
|||||||
|
|
||||||
guard_found = 0
|
guard_found = 0
|
||||||
pragma_once_found = 0
|
pragma_once_found = 0
|
||||||
include_next_found = 0
|
|
||||||
guard_name = ""
|
guard_name = ""
|
||||||
ifstack = 0
|
ifstack = 0
|
||||||
for line in inlines:
|
for line in inlines:
|
||||||
@ -80,8 +79,6 @@ def fix_headerguard(filename):
|
|||||||
else:
|
else:
|
||||||
guard_found += 1
|
guard_found += 1
|
||||||
line = "#endif /* %s */\n" % supposed
|
line = "#endif /* %s */\n" % supposed
|
||||||
elif line.startswith("#include_next"):
|
|
||||||
include_next_found = 1
|
|
||||||
|
|
||||||
tmp.write(line)
|
tmp.write(line)
|
||||||
|
|
||||||
@ -91,7 +88,6 @@ def fix_headerguard(filename):
|
|||||||
# Valid cases:
|
# Valid cases:
|
||||||
# - no #pragma once, classic headerguards (#ifndef, #define, #endif)
|
# - no #pragma once, classic headerguards (#ifndef, #define, #endif)
|
||||||
# - one #pragma once, no classic headerguards
|
# - one #pragma once, no classic headerguards
|
||||||
if include_next_found == 0:
|
|
||||||
for line in difflib.unified_diff(inlines, tmp.readlines(),
|
for line in difflib.unified_diff(inlines, tmp.readlines(),
|
||||||
"%s" % filename, "%s" % filename):
|
"%s" % filename, "%s" % filename):
|
||||||
sys.stdout.write(line)
|
sys.stdout.write(line)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user