Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 56a41fd

Browse files
committed
[[ Bug 19962 ]] Fix return type code in binding strings
1 parent 31fe5aa commit 56a41fd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

toolchain/lc-compile-ffi-java/src/generate.g

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@
324324
OutputWrite("(")
325325
OutputJavaParams(Params)
326326
OutputWrite(")")
327-
OutputJavaTypeCode(ReturnType)
327+
OutputJavaReturnTypeCode(ReturnType)
328328

329329
'action' OutputJavaParams(PARAMETERLIST)
330330

@@ -960,6 +960,15 @@
960960

961961
'rule' OutputJavaTypeCode(nil):
962962

963+
-- Ensure return type code is always specified as V if returning nothing
964+
'action' OutputJavaReturnTypeCode(TYPE)
965+
966+
'rule' OutputJavaReturnTypeCode(nil):
967+
OutputWrite("V")
968+
969+
'rule' OutputJavaReturnTypeCode(Type):
970+
OutputJavaTypeCode(Type)
971+
963972
'action' OutputJavaArrayTypeCode(TYPE, INT)
964973

965974
-- output java array

0 commit comments

Comments
 (0)