summaryrefslogtreecommitdiff
path: root/python/gras
diff options
context:
space:
mode:
Diffstat (limited to 'python/gras')
-rw-r--r--python/gras/GRAS_HierBlock.i10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/gras/GRAS_HierBlock.i b/python/gras/GRAS_HierBlock.i
index 2ffb349..65eb8d1 100644
--- a/python/gras/GRAS_HierBlock.i
+++ b/python/gras/GRAS_HierBlock.i
@@ -35,11 +35,11 @@
////////////////////////////////////////////////////////////////////////
// weak element overload for python
////////////////////////////////////////////////////////////////////////
-%inline %{
+%{
-struct WeakElementPyObject : gras::WeakElement
+struct WeakContainerPyObject : gras::WeakContainer
{
- WeakElementPyObject(PyObject *o):
+ WeakContainerPyObject(PyObject *o):
o(o)
{
//NOP
@@ -53,11 +53,13 @@ struct WeakElementPyObject : gras::WeakElement
inline void set_weak_py_self(gras::Element &elem, PyObject *o)
{
- elem.weak_self.reset(new WeakElementPyObject(o));
+ elem.set_container(new WeakContainerPyObject(o));
}
%}
+void set_weak_py_self(gras::Element &elem, PyObject *o);
+
////////////////////////////////////////////////////////////////////////
// Make a special top block with python safe unlocking wait
////////////////////////////////////////////////////////////////////////