|
1 | 1 | [//]: # (title: Mapping function pointers from C – tutorial)
|
2 | 2 |
|
| 3 | +<tldr> |
| 4 | + <p>This is the third part of the <strong>Mapping Kotlin and C</strong> tutorial series.</p> |
| 5 | + <p><img src="icon-1-done.svg" width="20" alt="First step"/> <a href="mapping-primitive-data-types-from-c.md">Mapping primitive data types from C</a><br/> |
| 6 | + <img src="icon-2-done.svg" width="20" alt="Second step"/> <a href="mapping-struct-union-types-from-c.md">Mapping struct and union types from C</a><br/> |
| 7 | + <img src="icon-3.svg" width="20" alt="Third step"/> <strong>Mapping function pointers</strong><br/> |
| 8 | + <img src="icon-4-todo.svg" width="20" alt="Fourth step"/> <a href="mapping-strings-from-c.md">Mapping strings from C</a><br/> |
| 9 | + </p> |
| 10 | +</tldr> |
| 11 | + |
3 | 12 | > The C libraries import is [Experimental](components-stability.md#stability-levels-explained).
|
4 | 13 | > All Kotlin declarations generated by the `cinterop` tool from C libraries
|
5 | 14 | > should have the `@ExperimentalForeignApi` annotation.
|
|
9 | 18 | >
|
10 | 19 | {style="warning"}
|
11 | 20 |
|
12 |
| -This is the third post in the series. The very first tutorial is |
13 |
| -[Mapping primitive data types from C](mapping-primitive-data-types-from-c.md). There are also |
14 |
| -[Mapping struct and union types from C](mapping-struct-union-types-from-c.md) and |
15 |
| -[Mapping strings from C](mapping-strings-from-c.md) tutorials. |
| 21 | +In this tutorial, you'll learn how to: |
16 | 22 |
|
17 |
| -In this tutorial We will learn how to: |
18 | 23 | - [Pass Kotlin function as C function pointer](#pass-kotlin-function-as-c-function-pointer)
|
19 | 24 | - [Use C function pointer from Kotlin](#use-the-c-function-pointer-from-kotlin)
|
20 | 25 |
|
@@ -259,13 +264,12 @@ fun main() {
|
259 | 264 | }
|
260 | 265 | ```
|
261 | 266 |
|
262 |
| -## Next Steps |
| 267 | +## Next step |
| 268 | +
|
| 269 | +In the next part of the series, you'll learn how strings are mapped between Kotlin and C: |
| 270 | + |
| 271 | +**[Proceed to the next part](mapping-strings-from-c.md)** |
263 | 272 |
|
264 |
| -Continue exploring more C language types and their representation in Kotlin/Native |
265 |
| -in next tutorials: |
266 |
| -- [Mapping primitive data types from C](mapping-primitive-data-types-from-c.md) |
267 |
| -- [Mapping struct and union types from C](mapping-struct-union-types-from-c.md) |
268 |
| -- [Mapping strings from C](mapping-strings-from-c.md) |
| 273 | +### See also |
269 | 274 |
|
270 |
| -The [C Interop documentation](native-c-interop.md) |
271 |
| - covers more advanced scenarios of the interop. |
| 275 | +Learn more in the [Interoperability with C](native-c-interop.md) documentation that covers more advanced scenarios. |
0 commit comments