summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xact.cc b/src/xact.cc
index c9f38d56..06f4d465 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -66,6 +66,10 @@ item_t::state_t xact_t::state() const
}
namespace {
+ value_t get_this(xact_t& xact) {
+ return value_t(static_cast<scope_t *>(&xact));
+ }
+
value_t get_entry(xact_t& xact) {
return value_t(static_cast<scope_t *>(xact.entry));
}
@@ -198,6 +202,11 @@ expr_t::ptr_op_t xact_t::lookup(const string& name)
else if (name == "total_cost")
return WRAP_FUNCTOR(get_wrapper<&get_total_cost>);
break;
+
+ case 'x':
+ if (name == "xact")
+ return WRAP_FUNCTOR(get_wrapper<&get_this>);
+ break;
}
return item_t::lookup(name);