aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-06-22 18:39:42 +0200
committerTristan Gingold <tgingold@free.fr>2021-06-22 18:39:42 +0200
commit25a3580831170f8a0acd0a79aca2c94ea4652338 (patch)
tree017c57006d1a2177899db509529cc3204a14cf0b
parent71ab241bb6284ef7105d43c9a9aa0baa53267a50 (diff)
downloadghdl-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.py2
-rwxr-xr-xscripts/pnodespy.py2
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")