Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix java call sites for short, int, and varargs #144

Merged
merged 3 commits into from
Feb 9, 2020

Conversation

easye
Copy link
Collaborator

@easye easye commented Feb 9, 2020

No description provided.

The FFI will now find Java call sites whose types are Short or Byte
with integers if they can be narrowed without losing information.

<https://mailman.common-lisp.net/pipermail/armedbear-devel/2019-December/004021.html>
Calling varargs with java.reflect.Method.invoke() is tricky.  Still
not sure how this works, but guessed at it after reading
<https://stackoverflow.com/questions/2600854/how-to-work-with-varargs-and-reflection>,
and it sems to work.

Test via

   (java:jstatic-raw "asList" "java.util.Arrays" (java:jnew-array (java:jclass "int") 1))
@easye easye merged commit c968b82 into armedbear:master Feb 9, 2020
@easye easye deleted the easye/20200209a branch March 11, 2020 21:13
@easye easye restored the easye/20200209a branch March 18, 2020 16:19
@easye easye deleted the easye/20200209a branch March 18, 2020 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant