mirror of
				https://github.com/GayPizzaSpecifications/pork.git
				synced 2025-11-03 17:39:38 +00:00 
			
		
		
		
	ffi: add c-style char* strings as a supported return type (#2)
This commit is contained in:
		@ -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")
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user