Skip to content

Commit

Permalink
add c++ header guards to objc++ files
Browse files Browse the repository at this point in the history
  • Loading branch information
li-feng-sc committed Mar 14, 2024
1 parent 09cd2b3 commit 4118df1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/source/ObjcppGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ class ObjcppGenerator(spec: Spec) extends BaseObjcGenerator(spec) {
w.wl("// AUTOGENERATED FILE - DO NOT MODIFY!")
w.wl("// This file was generated by Djinni from " + origin)
w.wl
w.wl("#ifdef __cplusplus")
if (refs.nonEmpty) {
var included = mutable.TreeSet[String]();
for (s <- refs) {
Expand All @@ -424,6 +425,7 @@ class ObjcppGenerator(spec: Spec) extends BaseObjcGenerator(spec) {
w.wl
}
f(w)
w.wl("#endif // __cplusplus")
})
}
}

0 comments on commit 4118df1

Please sign in to comment.