-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #292 from headius/new_varargs
Adapt variadic logic for new support in jffi
- Loading branch information
Showing
6 changed files
with
101 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package jnr.ffi.annotations; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
/** | ||
* Specifies that a non-varargs function binding will call a variadic C function with the specified number of fixed | ||
* arguments. | ||
* | ||
* Platforms that pass variadic arguments differently than fixed arguments will need this annotation if the Java binding | ||
* does not itself use varargs. Without Java varargs or this annotation, there's no way for jnr-ffi to know where fixed | ||
* args end and variadic arguments begin, causing them all to be passed the way fixed arguments get passed on the given | ||
* platform. | ||
* | ||
* See https://github.com/jnr/jnr-ffi/pull/292 | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface Variadic { | ||
int fixedCount(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters