Skip to content
Snippets Groups Projects
Commit b5645502 authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Fix emission of hybrid header includes

parent 0c03bf06
No related branches found
No related tags found
1 merge request!25Draft: C Interfacing
Pipeline #75832 passed
......@@ -49,7 +49,7 @@ class SfgFilePrinter:
if file.file_type == SfgSourceFileType.HYBRID_HEADER:
hybrid_includes = ""
for header in file.includes:
for header in file.hybrid_includes:
incl = str(header) if header.system_header else f'"{str(header)}"'
hybrid_includes += f"#include {incl}\n"
......@@ -63,10 +63,6 @@ class SfgFilePrinter:
else:
code += includes
for header in file.hybrid_includes:
incl = str(header) if header.system_header else f'"{str(header)}"'
code += f"#include {incl}\n"
if file.includes:
code += "\n"
......
......@@ -176,9 +176,8 @@ class SourceFileGenerator:
for inc in self._header_file.includes:
if inc.system_header and inc.__str__() in c_compatibility_headers:
c_header = inc.__str__().replace("<c", "<")
self._header_file.hybrid_includes += [HeaderFile(
c_header, system_header=True)]
c_header = inc.__str__().replace("<c", "<").replace(">", ".h>")
self._header_file.hybrid_includes += [HeaderFile.parse(c_header)]
if self._impl_file is not None:
impl_includes = collect_includes(self._impl_file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment