diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-06-22 18:39:42 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-06-22 18:39:42 +0200 |
commit | 25a3580831170f8a0acd0a79aca2c94ea4652338 (patch) | |
tree | 017c57006d1a2177899db509529cc3204a14cf0b | |
parent | 71ab241bb6284ef7105d43c9a9aa0baa53267a50 (diff) | |
download | ghdl-25a3580831170f8a0acd0a79aca2c94ea4652338.tar.gz ghdl-25a3580831170f8a0acd0a79aca2c94ea4652338.tar.bz2 ghdl-25a3580831170f8a0acd0a79aca2c94ea4652338.zip |
nodes.py: add an assertion on Get_Kind
This function is the most likely to be called on a Null_Iir node.
-rw-r--r-- | pyGHDL/libghdl/vhdl/nodes.py | 2 | ||||
-rwxr-xr-x | scripts/pnodespy.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pyGHDL/libghdl/vhdl/nodes.py b/pyGHDL/libghdl/vhdl/nodes.py index e698774ed..8e50a35ff 100644 --- a/pyGHDL/libghdl/vhdl/nodes.py +++ b/pyGHDL/libghdl/vhdl/nodes.py @@ -1801,7 +1801,7 @@ class Iir_Predefined(IntEnum): @export @BindToLibGHDL("vhdl__nodes__get_kind") def Get_Kind(node: Iir) -> IirKind: - """""" + assert node != 0 @export diff --git a/scripts/pnodespy.py b/scripts/pnodespy.py index 8146c947e..b4209bc90 100755 --- a/scripts/pnodespy.py +++ b/scripts/pnodespy.py @@ -66,7 +66,7 @@ def do_iirs_subprg(): @export @BindToLibGHDL("{classname}__get_kind") def Get_Kind(node: Iir) -> IirKind: - \"\"\"\"\"\" + assert node != 0 @export @BindToLibGHDL("{classname}__get_location") |