regcomp.c: Save computed value in variable for later use
authorKarl Williamson <public@khwilliamson.com>
Fri, 23 Dec 2011 15:42:17 +0000 (08:42 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 19 Jan 2012 18:58:17 +0000 (11:58 -0700)
This will be used in future commits.  Retrieving it via OP() doesn't
work in pass1 of the regex compiler.

regcomp.c

index d3a150e..88d9218 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -9019,21 +9019,21 @@ tryagain:
            STRLEN foldlen;
            U8 tmpbuf[UTF8_MAXBYTES_CASE+1], *foldbuf;
            regnode * orig_emit;
+            U8 node_type;
 
            ender = 0;
            orig_emit = RExC_emit; /* Save the original output node position in
                                      case we need to output a different node
                                      type */
-           ret = reg_node(pRExC_state,
-                          (U8) ((! FOLD) ? EXACT
+            node_type =    (U8) ((! FOLD) ? EXACT
                                          : (LOC)
                                             ? EXACTFL
                                             : (MORE_ASCII_RESTRICTED)
                                               ? EXACTFA
                                               : (AT_LEAST_UNI_SEMANTICS)
                                                 ? EXACTFU
-                                                : EXACTF)
-                   );
+                                                : EXACTF);
+           ret = reg_node(pRExC_state, node_type);
            s = STRING(ret);
            for (len = 0, p = RExC_parse - 1;
              len < 127 && p < RExC_end;