nagyistoce / jnaerator

Automatically exported from code.google.com/p/jnaerator
0 stars 0 forks source link

Failure to parse define with expression containing a cast #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have C header file with 

    #define DEV_DEBUG ((uint64_t)1 << 8)

Same error with u_int64_t or int64_t

2. run jnaerator-0.9.1.jar
3. get error

What is the expected output? 
 -- proper parsing of a 64-bit unsigned long typecast 1 shifted 8 bits

What do you see instead?
 -- And error message 
    "Failed to convert define 'DEV_DEBUG => ((uint64_t)1 << 8):"

What version of the product are you using? 0.9.1 On what operating system?
Ubuntu 9.04

Original issue reported on code.google.com by enzo6...@gmail.com on 8 Oct 2009 at 6:19

GoogleCodeExporter commented 9 years ago
The following constant is JNAerated properly :
{{{
const int DEV_DEBUG = ((uint64_t)1 << 8);
}}}
So the define ought to be too. Shouldn't be too hard to fix...

Original comment by olivier.chafik@gmail.com on 8 Oct 2009 at 6:32

GoogleCodeExporter commented 9 years ago
Fixed in revision #871 and upcoming snapshot.
Thanks for your report :-)

Original comment by olivier.chafik@gmail.com on 9 Oct 2009 at 12:24