diff options
author | Josh Blum | 2013-09-15 17:12:07 -0700 |
---|---|---|
committer | Josh Blum | 2013-09-15 17:12:07 -0700 |
commit | ad1b92f4ffaad6385d4872691c468078432de695 (patch) | |
tree | 0a9a485507d2cebe4735a32e2623919127451914 /python | |
parent | 6f1417ea164b16854f82e1a4be1364ed027b676f (diff) | |
download | sandhi-ad1b92f4ffaad6385d4872691c468078432de695.tar.gz sandhi-ad1b92f4ffaad6385d4872691c468078432de695.tar.bz2 sandhi-ad1b92f4ffaad6385d4872691c468078432de695.zip |
gras: py hier block minor hooks for basic block
Diffstat (limited to 'python')
-rw-r--r-- | python/gras/GRAS_PyHierBlocks.i | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/gras/GRAS_PyHierBlocks.i b/python/gras/GRAS_PyHierBlocks.i index 9f01397..8251336 100644 --- a/python/gras/GRAS_PyHierBlocks.i +++ b/python/gras/GRAS_PyHierBlocks.i @@ -139,6 +139,14 @@ struct HierBlockPython : HierBlock def to_element(obj): try: + + #BEGIN basic block support: + if not hasattr(obj, 'to_element') and hasattr(obj, 'to_basic_block'): + elem = obj.to_basic_block().to_element() + set_weak_py_self(elem, obj) + return elem + #END basic block support. + elem = obj.to_element() set_weak_py_self(elem, obj) return elem |