Wrong binding for Gsk.PathForeachFunc #240
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
java-gi/java-gi#240
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In Gsk.Path.foreach() one of its arguments is the callback function to be called for each iteration which is Gsk.PathForeachFunc
The callback function has the following C signature:
Meanwhile the Java binding has the following signature:
which is impossible to work with since we can't treat a Java reference as a pointer/array.
Thanks in advance.
Thanks for the issue report.
The
ptsargument has a missing array annotation in Gsk. I'll create an MR upstream.As a temporary workaround, save the following into
PathForeachFunc_fixed.javaand use the staticforeach()function instead of Gsk'sPath.foreach().Thanks for the temporary solution.
The correct imports for FunctionPointer and Interop are:
My apologies, I generated this code from java-gi’s main branch. (The
io.github.jwharm.javagipackage names will change in the upcoming release toorg.javagi.)MR link: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8716
The MR was merged, it will be fixed in GNOME 49 (and in the subsequent java-gi release).