Implement CValuesRef in interop

* Represent pointer parameters of C functions as `CValuesRef`.
* Represent struct value parameters as `CValue`.
* Implement some helper methods to make the new approach more useful.
* Migrate some code to new interop approach for pointers and values.

Also do not map to `String?`:
- pointers to 8-bit integers;
- pointers to non-const chars.
This commit is contained in:
Svyatoslav Scherbina
2017-03-16 14:48:17 +07:00
committed by SvyatoslavScherbina
parent 7a876a3ccd
commit c9d8d4d57d
22 changed files with 2072 additions and 1557 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ fun main(args: Array<String>) = memScoped {
}
val error = errorRef.value
if (error != null) {
println(error.asCString().toString())
println(error.toKString())
return
}