Commit b7b2ea75 authored by Nagy Tibor's avatar Nagy Tibor

Change how externs are emitted for relibc

parent 95821b3b
...@@ -133,11 +133,13 @@ impl Bindings { ...@@ -133,11 +133,13 @@ impl Bindings {
out.new_line(); out.new_line();
} }
if self.config.language == Language::Cxx { out.new_line_if_not_start();
out.new_line_if_not_start(); out.write("#ifdef __cplusplus");
out.write("extern \"C\" {"); out.new_line();
out.new_line(); out.write("extern \"C\" {");
} out.new_line();
out.write("#endif");
out.new_line();
for global in &self.globals { for global in &self.globals {
out.new_line_if_not_start(); out.new_line_if_not_start();
...@@ -157,11 +159,15 @@ impl Bindings { ...@@ -157,11 +159,15 @@ impl Bindings {
out.new_line(); out.new_line();
} }
if self.config.language == Language::Cxx { out.new_line_if_not_start();
out.new_line_if_not_start(); out.write("#ifdef __cplusplus");
out.write("} // extern \"C\""); out.new_line();
out.new_line(); out.write("} // extern \"C\"");
out.new_line();
out.write("#endif");
out.new_line();
if self.config.language == Language::Cxx {
self.close_namespaces(&mut out); self.close_namespaces(&mut out);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment