Browse files

Merge pull request #73 from ruslanys/patch-2

Using JNI with Kotlin
  • Loading branch information...
phplego committed Dec 18, 2017
2 parents 64a0d8b + 366292a commit 022596941e3eb6b4f3d268dacbd672d54df0ed05
Showing with 3 additions and 3 deletions.
  1. +3 −3
@@ -613,12 +613,12 @@ abstract method.
Also note that this feature works only for Java interop; since Kotlin has proper function types, automatic conversion
of functions into implementations of Kotlin interfaces is unnecessary and therefore unsupported.
## Using JNI with Kotlin
## Использование JNI в Kotlin
To declare a function that is implemented in native (C or C++) code, you need to mark it with the `external` modifier:
Чтобы объявить функцию, реализованную на нативном (C или C++) коде, Вам нужно пометить ее модификатором `external`:
``` kotlin
external fun foo(x: Int): Double
The rest of the procedure works in exactly the same way as in Java.
В остальном, процедура работы аналогична Java.

0 comments on commit 0225969

Please sign in to comment.