Skip to content

Commit

Permalink
Revert "fixes for objective c"
Browse files Browse the repository at this point in the history
This reverts commit 42defb6.
  • Loading branch information
stmitt committed Aug 29, 2023
1 parent 42defb6 commit b7c1deb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/source/ObjcppGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ObjcppGenerator(spec: Spec) extends BaseObjcGenerator(spec) {
imports.add("#import " + q(spec.objcBaseLibIncludePrefix + "DJIMarshal+Private.h"))
imports.add("!#include " + q(spec.objcppIncludeCppPrefix + spec.cppFileIdentStyle(ident) + "." + spec.cppHeaderExt))

writeObjcFile(objcppMarshal.privateHeaderName(ident.name), origin, imports, w => {}, true, true)
writeObjcFile(objcppMarshal.privateHeaderName(ident.name), origin, imports, w => {}, true)
}

def headerName(ident: String): String = idObjc.ty(ident) + "." + spec.objcHeaderExt
Expand Down Expand Up @@ -405,16 +405,13 @@ class ObjcppGenerator(spec: Spec) extends BaseObjcGenerator(spec) {
})
}

def writeObjcFile(fileName: String, origin: String, refs: Iterable[String], f: IndentWriter => Unit, ifDefCpp: Boolean = false, isEnum: Boolean = false) {
def writeObjcFile(fileName: String, origin: String, refs: Iterable[String], f: IndentWriter => Unit, ifDefCpp: Boolean = false) {
createFile(spec.objcppOutFolder.get, fileName, (w: IndentWriter) => {
w.wl("// AUTOGENERATED FILE - DO NOT MODIFY!")
w.wl("// This file was generated by Djinni from " + origin)
if (ifDefCpp) {
w.wl("#ifdef __cplusplus")
}
if (isEnum) {
w.wl("#ifndef __OBJC__")
}
w.wl
if (refs.nonEmpty) {
var included = mutable.TreeSet[String]();
Expand All @@ -433,9 +430,6 @@ class ObjcppGenerator(spec: Spec) extends BaseObjcGenerator(spec) {
if (ifDefCpp) {
w.wl("#endif")
}
if (isEnum) {
w.wl("#endif")
}
})
}
}

0 comments on commit b7c1deb

Please sign in to comment.