LWJGL / lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
https://www.lwjgl.org
BSD 3-Clause "New" or "Revised" License
4.67k stars 629 forks source link

LLVMGetBufferStart returns String instead of long because of const char* return type #934

Closed KitsuneAlex closed 7 months ago

KitsuneAlex commented 8 months ago

Version

3.3.3

Platform

Linux x64, Linux arm64, Linux arm32, macOS x64, macOS arm64, Windows x64, Windows x86, Windows arm64

JDK

Zulu OpenJDK 21

Module

LLVM

Bug description

There is a code generation bug involving the LLVMGetBufferStart function, as it falsely returns a String instead of a long, because the code generator seems to assume String based on the native function's const char* return type. Imo LLVM itself should just return a (const) void* there.. But that's not to question for me xD

This small issue has been bugging me for a while as i have to use the nGetBufferStart function instead as a workaround.

Thanks for the great work on the LLVM bindings otherwise, really nice to quickly build a compiler in Java :)

Stacktrace or crash log output

No response

Spasi commented 7 months ago

@KitsuneAlex This will be fixed in the first 3.3.4 snapshot, thanks!