only output digits in integer literals in write_jna
authorMatthias Braun <matthias.braun@kit.edu>
Thu, 26 Jul 2012 14:13:02 +0000 (16:13 +0200)
committerMatthias Braun <matthias.braun@kit.edu>
Thu, 26 Jul 2012 14:34:12 +0000 (16:34 +0200)
wrappergen/write_jna.c

index b209042..9814b8f 100644 (file)
@@ -308,7 +308,10 @@ static void write_expression(const expression_t *expression)
        /* TODO */
        switch(expression->kind) {
        case EXPR_LITERAL_INTEGER:
-               fprintf(out, "%s", expression->literal.value.begin);
+               for (const char *c = expression->literal.value.begin;
+                        (*c >= '0' && *c <= '9') || *c == '+'; ++c) {
+                       fputc(*c, out);
+               }
                break;
 
        case EXPR_ENUM_CONSTANT: {