]> git.wincent.com - wikitext.git/commitdiff
Rename _Wikitext_downcase to _Wikitext_downcase_bang
authorWincent Colaiuta <win@wincent.com>
Fri, 8 May 2009 08:43:51 +0000 (10:43 +0200)
committerWincent Colaiuta <win@wincent.com>
Fri, 8 May 2009 08:43:51 +0000 (10:43 +0200)
This is a destructive function which overwrites the original
contents of the string, so indicate that in the function name
itself.

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

index 5a6e2eb55ede17477eecb65e42627f580c88da5f..793ad7e096cb9f6bd870e46cfa3dd305cf596595 100644 (file)
@@ -218,7 +218,7 @@ VALUE Wikitext_parser_fulltext_tokenize(int argc, VALUE *argv, VALUE self)
 }
 
 // we downcase "in place", overwriting the original contents of the buffer and returning the same string
-VALUE _Wikitext_downcase(VALUE string)
+VALUE _Wikitext_downcase_bang(VALUE string)
 {
     char *ptr   = RSTRING_PTR(string);
     long len    = RSTRING_LEN(string);
@@ -2367,7 +2367,7 @@ VALUE Wikitext_parser_parse(int argc, VALUE *argv, VALUE self)
                 i = NIL_P(parser->capture) ? parser->output : parser->capture;
                 _Wikitext_pop_excess_elements(parser);
                 _Wikitext_start_para_if_necessary(parser);
-                rb_str_append(i, _Wikitext_downcase(TOKEN_TEXT(token)));
+                rb_str_append(i, _Wikitext_downcase_bang(TOKEN_TEXT(token)));
                 break;
 
             case QUOT: