ffi: add c-style char* strings as a supported return type

This commit is contained in:
a dinosaur 2023-09-10 12:21:08 +10:00
parent 3a43b56fcd
commit e4bb342f06

View File

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