Add support for using versionned symbols #189
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow-up to jnr/jffi#66 and use the new API to make it possible to access versioned symbols in a shared library.
Please note that I usually don't do Java. Instructions for improvements are welcome so that I can update the PR!
With my knowledge of Java, I could not find a better way to access two versions of the same function by assigning a new unique name for each function name and version combinaison. I therefore added 2 annotations that can be used on a function to indicate the actual function name (
Function
annotation) and the version to use (Version
annotation).The test suite therefore tests:
answer
;answer
(in another class);old_answer
;new_answer
;answer_1_0
andanswer_1_1
.CI failures are expected at this stage since jffi changes have not been merged yet.