]> git.wincent.com - wikitext.git/blobdiff - ext/parser.c
Silence compiler warning in StringValue
[wikitext.git] / ext / parser.c
index 4728ad8a77fadd5c03a61deda9d448ca50c5fc08..52c08895dd4d9fc7f76c24cd48f2f6252366cfa2 100644 (file)
@@ -2158,7 +2158,10 @@ VALUE Wikitext_parser_parse(int argc, VALUE *argv, VALUE self)
                     {
                         j = rb_funcall(link_proc, rb_intern("call"), 1, string_from_str(parser->link_target));
                         if (!NIL_P(j))
-                            j = StringValue(j);
+                        {
+                            VALUE l = j; // can't cast inside StringValue macro
+                            j = StringValue(l);
+                        }
                     }
                     wiki_encode_link_target(parser);
                     wiki_pop_from_stack_up_to(parser, output, LINK_START, true);