aboutsummaryrefslogtreecommitdiff
path: root/build2/action.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-01 13:00:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-01 13:00:16 +0200
commiteacf7f7ccd40a56d1fe761d3d30ced6c6acd58da (patch)
tree841a87d57720704654e8e8fa94cecd05c17b6cfa /build2/action.hxx
parent8ba507252cb932023d16e5d4dfef267c039feb78 (diff)
Add support for rule-specific variables, use to fix cc.type data race
Diffstat (limited to 'build2/action.hxx')
-rw-r--r--build2/action.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/build2/action.hxx b/build2/action.hxx
index 8c9b7e5..321d2c1 100644
--- a/build2/action.hxx
+++ b/build2/action.hxx
@@ -114,10 +114,10 @@ namespace build2
template <typename T>
struct action_state
{
- T states[2]; // [0] -- inner, [1] -- outer.
+ T data[2]; // [0] -- inner, [1] -- outer.
- T& operator[] (action a) {return states[a.inner () ? 0 : 1];}
- const T& operator[] (action a) const {return states[a.inner () ? 0 : 1];}
+ T& operator[] (action a) {return data[a.inner () ? 0 : 1];}
+ const T& operator[] (action a) const {return data[a.inner () ? 0 : 1];}
};
// Id constants for build-in and pre-defined meta/operations.