开发者

Java Type Mapping for Java Native Access

开发者 https://www.devze.com 2022-12-20 19:36 出处:网络
I have a C function defined as follows: int s3vo开发者_JS百科ld_(void) {...} To create a Java methods with the same argument type as the native function does the void parameter map to Pointer or no

I have a C function defined as follows:

int s3vo开发者_JS百科ld_(void) {...}

To create a Java methods with the same argument type as the native function does the void parameter map to Pointer or nothing? E.g.,

int s3vold(Pointer p) {...}

or

int s3vold() {...}

The JNA docs only refer to void*


The void parameter maps to nothing. The void parameter in C is equivalent to an empty parameter list: in other languages we leave this blank, but in C we write void to distinguish from a classic K&R function declaration.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号