tags:

views:

60

answers:

1

I have a C function defined as follows:

int s3vold_(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*

+1  A: 

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.

Adrian Cox