ffi: add c-style char* strings as a supported return type (#2)

This commit is contained in:
a dinosaur 2023-09-10 12:31:48 +10:00 committed by GitHub
parent 4a9508ddc4
commit 03c278f5b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ class JnaNativeProvider : NativeFunctionProvider {
"float" -> function.invokeFloat(values)
"double" -> function.invokeDouble(values)
"void" -> function.invokeVoid(values)
"char*" -> function.invokeString(values, false)
else -> throw RuntimeException("Unsupported ffi return type: $type")
}
}