Hack around parser bug with char enum element values

Enum element somehow lose the single quotes around them, compensate for it in
C module code (other modules use module-specific constvalue feature to work
around it, but it seems better to do it in SWIG itself rather than leaving the
user code to deal with it).

This finally makes the "enums" unit test pass.
This commit is contained in:
Vadim Zeitlin 2016-04-16 00:25:50 +02:00
commit 3d21bb2c96
3 changed files with 21 additions and 3 deletions

View file

@ -29,7 +29,6 @@ CPP_TEST_CASES := \
# The following tests are currently broken and need to be fixed.
FAILING_C_TESTS := \
arrays \
enums \
funcptr \
function_typedef \
lextype \

View file

@ -4,6 +4,7 @@
int main() {
assert(GlobalInstance == globalinstance1);
assert(Char == 'a');
bar2(1);
bar3(1);
bar1(1);