Support @CName annotation for reverse C interop, similar to @JvmName. (#1237)

This commit is contained in:
Nikolay Igotti
2018-01-17 19:34:00 +03:00
committed by GitHub
parent 76bfb9322d
commit 77f220f335
7 changed files with 111 additions and 33 deletions
@@ -18,7 +18,6 @@ int main(void) {
const char* string = __ kotlin.root.getString();
__ kotlin.root.hello();
__ kotlin.root.Base.foo(base);
__ kotlin.root.Base.fooParam(base, "a", 1);
@@ -37,6 +36,10 @@ int main(void) {
printf("object = %d\n", __ kotlin.root.Codeable.asCode(object1));
topLevelFunctionVoidFromC(42);
__ kotlin.root.topLevelFunctionVoid(42);
printf("topLevel = %d %d\n", topLevelFunctionFromC(780, 3), __ kotlin.root.topLevelFunctionFromCShort(5, 2));
__ DisposeString(string);
__ DisposeStablePointer(base.pinned);
__ DisposeStablePointer(child.pinned);