]> granicus.if.org Git - re2c/commitdiff
libre2c: free tag history after each step (it's no longer needed).
authorUlya Trofimovich <skvadrik@gmail.com>
Mon, 25 Mar 2019 16:40:04 +0000 (16:40 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Mon, 25 Mar 2019 16:40:04 +0000 (16:40 +0000)
Seems to be a copy-paste error from TDFA implementation, where history
for each state is needed until the end of determinization.

lib/regexec_nfa_posix.cc

index 64fb2dc8d0cca3b05f562ddc4c06aef348c58311..4d29d8a165f7b90ec1131b85d5a75407b9389fb3 100644 (file)
@@ -64,7 +64,7 @@ int regexec_nfa_posix(const regex_t *preg, const char *string
 
 void closure_posix(psimctx_t &ctx)
 {
-    ctx.history.detach();
+    ctx.history.init();
 
     if (ctx.flags & REG_GTOP) {
         closure_posix_gtop(ctx);