aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyGHDL/dom/_Utils.py2
-rw-r--r--pyGHDL/libghdl/vhdl/nodes.py2
-rwxr-xr-xscripts/pnodespy.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/pyGHDL/dom/_Utils.py b/pyGHDL/dom/_Utils.py
index 2142490e3..e75c5f36a 100644
--- a/pyGHDL/dom/_Utils.py
+++ b/pyGHDL/dom/_Utils.py
@@ -53,6 +53,8 @@ __MODE_TRANSLATION = {
@export
def GetIirKindOfNode(node: Iir) -> nodes.Iir_Kind:
+ # This function is the most likely to be called on a Null_Iir node
+ assert node != 0
kind: int = nodes.Get_Kind(node)
return nodes.Iir_Kind(kind)
diff --git a/pyGHDL/libghdl/vhdl/nodes.py b/pyGHDL/libghdl/vhdl/nodes.py
index 9d44580b4..1a4cf043f 100644
--- a/pyGHDL/libghdl/vhdl/nodes.py
+++ b/pyGHDL/libghdl/vhdl/nodes.py
@@ -1802,7 +1802,7 @@ class Iir_Predefined(IntEnum):
@export
@BindToLibGHDL("vhdl__nodes__get_kind")
def Get_Kind(node: Iir) -> IirKind:
- assert node != 0
+ """Get node kind"""
@export
diff --git a/scripts/pnodespy.py b/scripts/pnodespy.py
index e76869683..f443d36c5 100755
--- a/scripts/pnodespy.py
+++ b/scripts/pnodespy.py
@@ -65,7 +65,7 @@ def do_iirs_subprg():
@export
@BindToLibGHDL("{classname}__get_kind")
def Get_Kind(node: Iir) -> IirKind:
- assert node != 0
+ \"\"\"Get node kind\"\"\"
@export
@BindToLibGHDL("{classname}__get_location")