diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-12-11 20:53:32 +0300 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-12-14 09:30:44 +0200 |
commit | ca6a61f432f3ff0257e868bed36a58540623ab49 (patch) | |
tree | e3652b0376b9a6235aec6c32b5d9bd410e0507e5 /libbuild2/target.ixx | |
parent | 4e8e690640c1dc9ecc78edce1c2e11c28850bfa2 (diff) |
Fix bug in create_new_target_locked()
Diffstat (limited to 'libbuild2/target.ixx')
-rw-r--r-- | libbuild2/target.ixx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index df1cf5b..2d1906e 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -12,10 +12,16 @@ namespace build2 // target // inline const string* target:: + ext_locked () const + { + return *ext_ ? &**ext_ : nullptr; + } + + inline const string* target:: ext () const { slock l (ctx.targets.mutex_); - return *ext_ ? &**ext_ : nullptr; + return ext_locked (); } inline target_key target:: @@ -30,6 +36,18 @@ namespace build2 e != nullptr ? optional<string> (*e) : nullopt}; } + inline target_key target:: + key_locked () const + { + const string* e (ext_locked ()); + return target_key { + &type (), + &dir, + &out, + &name, + e != nullptr ? optional<string> (*e) : nullopt}; + } + inline names target:: as_name () const { |