diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-07-10 16:05:41 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-07-10 16:05:41 -0700 |
commit | 052060f10906ca859d2313b86800e110bd34b79f (patch) | |
tree | 356107e4270feb84046b984a98e0874f1436b2d9 /misc | |
parent | 35fd9b04731d3bc944e1471b96668ef0cf7b51f1 (diff) | |
parent | bb2144ae733f1a2c5e629a8251bfbdcc15559aa4 (diff) | |
download | yosys-052060f10906ca859d2313b86800e110bd34b79f.tar.gz yosys-052060f10906ca859d2313b86800e110bd34b79f.tar.bz2 yosys-052060f10906ca859d2313b86800e110bd34b79f.zip |
Merge remote-tracking branch 'origin/master' into xaig_dff
Diffstat (limited to 'misc')
-rw-r--r-- | misc/py_wrap_generator.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/misc/py_wrap_generator.py b/misc/py_wrap_generator.py index 9e5727499..66d661fa1 100644 --- a/misc/py_wrap_generator.py +++ b/misc/py_wrap_generator.py @@ -779,6 +779,9 @@ class WClass: #if self.link_type != link_types.pointer: text += "\n\t\tstatic " + self.name + "* get_py_obj(" + long_name + "* ref)\n\t\t{" + text += "\n\t\t\tif(ref == nullptr){" + text += "\n\t\t\t\tthrow std::runtime_error(\"" + self.name + " does not exist.\");" + text += "\n\t\t\t}" text += "\n\t\t\t" + self.name + "* ret = (" + self.name + "*)malloc(sizeof(" + self.name + "));" if self.link_type == link_types.pointer: text += "\n\t\t\tret->ref_obj = ref;" |