diff options
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 { |