summaryrefslogtreecommitdiff
path: root/lib/hier_block.cpp
diff options
context:
space:
mode:
authorJosh Blum2013-04-10 00:21:31 -0700
committerJosh Blum2013-04-10 00:21:31 -0700
commitfb55fd6737902ed6270c2518bdc81a6971f9b3a1 (patch)
treec31dcb488f97f4c016ad326c726d5f42bcb6bca0 /lib/hier_block.cpp
parentca4819c56e7f085c1358cd75a9f4635ce3ae2f1f (diff)
downloadsandhi-fb55fd6737902ed6270c2518bdc81a6971f9b3a1.tar.gz
sandhi-fb55fd6737902ed6270c2518bdc81a6971f9b3a1.tar.bz2
sandhi-fb55fd6737902ed6270c2518bdc81a6971f9b3a1.zip
gras: formalize the weak container api w/ docs
address issue #69, we now have a set_container call, which is now formally part of the api. Anyone can call set_container for custom container types. GRAS supports shared ptr and pyobject out of the box.
Diffstat (limited to 'lib/hier_block.cpp')
-rw-r--r--lib/hier_block.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/hier_block.cpp b/lib/hier_block.cpp
index d8756a4..758af0c 100644
--- a/lib/hier_block.cpp
+++ b/lib/hier_block.cpp
@@ -40,9 +40,10 @@ void HierBlock::disconnect(const Element &elem)
static Apology::Wax get_ref(const Element &elem)
{
- if (elem.weak_self)
+ boost::shared_ptr<WeakContainer> weak_self = elem->weak_self;
+ if (weak_self)
{
- boost::shared_ptr<const void> shared_self = elem.weak_self->lock();
+ boost::shared_ptr<const void> shared_self = weak_self->lock();
if (shared_self) return shared_self;
}
return elem;