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

64-bit (long) constants #296

Closed
rslemos opened this Issue Apr 6, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@rslemos

rslemos commented Apr 6, 2012

From C #define

#define MAXDWORD64 ((DWORD64) 0xffffffffffffffff)

JNAerator generates

public static final long MAXDWORD64 = (long)(0xffffffffffffffff);

Javac then complains: "The literal 0xffffffffffffffff of type int is out of range".

Correct code to be generated in this case (note the "L" suffix):

public static final long MAXDWORD64 = (long)(0xffffffffffffffffL);

@rslemos rslemos closed this Apr 6, 2012

@rslemos rslemos reopened this Apr 6, 2012

@rslemos

This comment has been minimized.

rslemos commented Apr 6, 2012

Forgot to say: I'm using the 0.9.10-SNAPSHOT mavenized version:

<groupId>com.nativelibs4java</groupId>
<artifactId>maven-jnaerator-plugin</artifactId>
<version>0.9.10-SNAPSHOT</version>
@ochafik

This comment has been minimized.

Member

ochafik commented Apr 8, 2012

Hi @rslemos ,

Thanks a lot for your report !

This should be fixed in the latest Maven snapshot.

Cheers

@ochafik ochafik closed this Apr 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment