Commit 143fb84c authored by Jacob Potter's avatar Jacob Potter

Assorted small fixes/cleanups

parent 805c1eda
......@@ -20,11 +20,9 @@ import djinni.ast.Record.DerivingType
import djinni.ast._
import djinni.generatorTools._
import djinni.meta._
import djinni.syntax.Error
import djinni.writer.IndentWriter
import scala.collection.mutable
import scala.collection.parallel.immutable
class ObjcppGenerator(spec: Spec) extends Generator(spec) {
......@@ -229,7 +227,7 @@ class ObjcppGenerator(spec: Spec) extends Generator(spec) {
if (i.ext.objc) {
// If it could be implemented in ObjC, we might have to unwrap a proxy object.
val objcExtSelf = objcppMarshal.helperClass("objc_proxy")
w.w(s"if (auto cppPtr = dynamic_cast<${objcExtSelf}*>(cpp.get()))").braced {
w.w(s"if (auto cppPtr = dynamic_cast<$objcExtSelf*>(cpp.get()))").braced {
w.wl("return cppPtr->Handle::get();")
}
}
......@@ -277,7 +275,7 @@ class ObjcppGenerator(spec: Spec) extends Generator(spec) {
w.wl(s"struct $helperClass")
w.bracedSemi {
w.wl(s"using CppType = $cppSelf;")
w.wl(s"using ObjcType = $noBaseSelf*;");
w.wl(s"using ObjcType = $noBaseSelf*;")
w.wl
w.wl(s"using Boxed = $helperClass;")
w.wl
......
......@@ -174,7 +174,6 @@ void jniThrowAssertionError(JNIEnv * env, const char * file, int line, const cha
env->ExceptionClear();
env->DeleteLocalRef(cassert);
env->DeleteLocalRef(e);
jniThrowCppFromJavaException(env, e);
}
......
# Record containing constants
constants = record {
some_integer: i32;
some_string: string;
......
......@@ -8,6 +8,7 @@
#include <string>
#include <utility>
/** Record containing constants */
struct Constants final {
/** bool_constant has documentation. */
......
......@@ -6,6 +6,7 @@ package com.dropbox.djinni.test;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
/** Record containing constants */
public final class Constants {
/** bool_constant has documentation. */
......
......@@ -4,6 +4,7 @@
#import "DBConstants.h"
#import <Foundation/Foundation.h>
/** Record containing constants */
@interface DBConstants : NSObject
- (nonnull instancetype)initWithSomeInteger:(int32_t)someInteger
someString:(nonnull NSString *)someString;
......
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