From a4e94b6f9fe1150042566f3a620ba01211d5f659 Mon Sep 17 00:00:00 2001 From: Ioannis Tsakpinis Date: Mon, 9 Dec 2024 20:17:42 +0200 Subject: [PATCH] fix(generator) local boolean-int variable type --- .../src/main/kotlin/org/lwjgl/generator/Functions.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/generator/src/main/kotlin/org/lwjgl/generator/Functions.kt b/modules/generator/src/main/kotlin/org/lwjgl/generator/Functions.kt index 4571cbc4b0..02ef0d0fb7 100644 --- a/modules/generator/src/main/kotlin/org/lwjgl/generator/Functions.kt +++ b/modules/generator/src/main/kotlin/org/lwjgl/generator/Functions.kt @@ -1142,7 +1142,10 @@ class Func( printParams: PrintWriter.() -> Unit ) { val returnsObject = returns.nativeType is WrappedPointerType - val returnType = if (returnsObject) returns.nativeType.className else returns.nativeMethodType(nullable = false) + val returnType = if (returnsObject || returns.nativeType.mapping == PrimitiveMapping.BOOLEAN4) + returns.javaMethodType + else + returns.nativeMethodType(nullable = false) if (hasFinally) print(t)