changeset 283:fbdb94df9eac

TState atomic update
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Sun, 31 Jan 2016 20:08:04 +0900
parents 87a801c14117
children 5d23dc02f60d
files regexParser/threadedSearch.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/regexParser/threadedSearch.cc	Sun Jan 31 19:53:58 2016 +0900
+++ b/regexParser/threadedSearch.cc	Sun Jan 31 20:08:04 2016 +0900
@@ -29,7 +29,6 @@
 TStatePtr generateTState(StatePtr state, TransitionGeneratorPtr tg) {
     TStatePtr tState = NEW(TState);
     tState->state = state;
-    state->tState = tState;
     int ccvSize = 0;
     CharClassWalkerPtr ccw = createCharClassWalker(state->cc);
     while (hasNext(ccw)) {
@@ -62,6 +61,7 @@
         ccv->w = cc->cond.w;
     }
     free(ccw);
+    state->tState = tState;
     return tState;
 }