]> git.wincent.com - wikitext.git/commitdiff
Use char type for boolean struct members
authorWincent Colaiuta <win@wincent.com>
Fri, 8 May 2009 13:29:41 +0000 (15:29 +0200)
committerWincent Colaiuta <win@wincent.com>
Fri, 8 May 2009 13:29:41 +0000 (15:29 +0200)
It's wasteful to use a 32 (possibly even 64) bit integer to hold a
simple boolean value, so use the char type instead.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
ext/parser.c

index d28ade20595916d3f9687734f1a9330f5b769323..24ccd8eae88fe6dfe54ead6f3ee00650b6dd50b7 100644 (file)
@@ -57,9 +57,9 @@ typedef struct
     ary_t   *scope;                 // stack for tracking scope
     ary_t   *line;                  // stack for tracking scope as implied by current line
     ary_t   *line_buffer;           // stack for tracking raw tokens (not scope) on current line
-    int     pending_crlf;           // boolean
-    int     autolink;               // boolean
-    int     space_to_underscore;    // boolean
+    char    pending_crlf;           // boolean
+    char    autolink;               // boolean
+    char    space_to_underscore;    // boolean
     str_t   *line_ending;
     int     base_indent;            // controlled by the :indent option to Wikitext::Parser#parse
     int     current_indent;         // fluctuates according to currently nested structures