Renamed Kotlin_start to Konan_start.

This commit is contained in:
Alexander Gorshenev
2016-12-01 17:42:54 +03:00
committed by alexander-gorshenev
parent 80e39cb7c9
commit 80c50c24e6
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -615,7 +615,7 @@ task args0(type: RunKonanTest) {
} }
task main_exception(type: RunKonanTest) { task main_exception(type: RunKonanTest) {
goldValue = "Uncaught exception from kotlin main: Throwable\n" goldValue = "Uncaught exception from Kotlin's main: Throwable\n"
source = "runtime/basic/main_exception.kt" source = "runtime/basic/main_exception.kt"
} }
+2 -2
View File
@@ -15,14 +15,14 @@ ArrayHeader* setupArgs(int argc, char** argv) {
return args; return args;
} }
extern "C" void Kotlin_start(ArrayHeader* ); extern "C" void Konan_start(ArrayHeader* );
int main(int argc, char** argv) { int main(int argc, char** argv) {
InitMemory(); InitMemory();
ArrayHeader* args = setupArgs(argc, argv); ArrayHeader* args = setupArgs(argc, argv);
Kotlin_start(args); Konan_start(args);
// Yes, we have to follow Java convention and return zero. // Yes, we have to follow Java convention and return zero.
return 0; return 0;
+3 -3
View File
@@ -3,16 +3,16 @@ import konan.internal.ExportForCppRuntime
external fun main(args: Array<String>) external fun main(args: Array<String>)
@ExportForCppRuntime @ExportForCppRuntime
private fun Kotlin_start(args: Array<String>) { private fun Konan_start(args: Array<String>) {
try { try {
// This is kotlin program main entry point // This is kotlin program main entry point
main(args) main(args)
} catch (e: Throwable) { } catch (e: Throwable) {
// TODO: Remove .toString() when println is more capabe, // TODO: Remove .toString() when println is more capable,
// and may be add some more info. // and may be add some more info.
print("Uncaught exception from kotlin main: ") print("Uncaught exception from Kotlin's main: ")
println(e.toString()) println(e.toString())
} }
} }