Menu

#665 character enums broken in 1.3.29

closed-fixed
5
2006-04-14
2006-04-11
Evan Wies
No

test.i:
enum {
TEST_ENUM = 'A'
};
/// This is legal C, which will just make TEST_ENUM
/// the integral value of 'A'

swig -java test.i
test.i:3: Error: Type error. Expecting an int

same thing happens for ruby and i assume all others

I modified the parser.y to print the actual type as well:
test.i:3: Error: Type error. Expecting an int, got a 29

29 is T_CHAR

The parser code seems to allow T_SCHAR and T_UCHAR, but
not T_CHAR.

This is with the release version of 1.3.29. It worked
fine in 1.3.28.

Looking in CVS history I suspect that this might be a
regression for the fix of bug 1435090?

Sorry no patch today.

Discussion

  • Marcelo Matus

    Marcelo Matus - 2006-04-14

    Logged In: YES
    user_id=246059

    it is fixed now, thanks.

    Marcelo

     
  • Marcelo Matus

    Marcelo Matus - 2006-04-14
    • status: open --> closed-fixed
     

Log in to post a comment.