Implement parsing additional interop header directly from .def file (#557)

This commit is contained in:
SvyatoslavScherbina
2017-05-09 19:48:19 +03:00
committed by GitHub
parent c2d556503d
commit 88e3c1d05c
6 changed files with 106 additions and 5 deletions
+4 -1
View File
@@ -1,8 +1,11 @@
import cstdio.*
import kotlinx.cinterop.*
val stdout
get() = getStdout()
fun main(args: Array<String>) {
printf("%s %s %d %d %d %lld %.1f %.1lf\n",
fprintf(stdout, "%s %s %d %d %d %lld %.1f %.1lf\n",
"a", "b".cstr, (-1).toByte(), 2.toShort(), 3, Long.MAX_VALUE, 0.1.toFloat(), 0.2)
memScoped {
@@ -1 +1,7 @@
headers = stdio.h
headers = stdio.h
---
static inline FILE* getStdout() {
return stdout;
}