diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-01-11 18:49:48 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-01-11 18:49:48 +0100 |
commit | 45d43e9296d8f7bd15a9e975a311f3c91a53513e (patch) | |
tree | 26bab94c64bb115854cf8aa9e28a91139c2df675 /pyGHDL/libghdl | |
parent | 96f38dc018e63588e294163452d2f0c96e46f35f (diff) | |
download | ghdl-45d43e9296d8f7bd15a9e975a311f3c91a53513e.tar.gz ghdl-45d43e9296d8f7bd15a9e975a311f3c91a53513e.tar.bz2 ghdl-45d43e9296d8f7bd15a9e975a311f3c91a53513e.zip |
pyGHDL: fix wrappers for lists
Diffstat (limited to 'pyGHDL/libghdl')
-rw-r--r-- | pyGHDL/libghdl/vhdl/lists.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pyGHDL/libghdl/vhdl/lists.py b/pyGHDL/libghdl/vhdl/lists.py index dc4391ebf..758f459de 100644 --- a/pyGHDL/libghdl/vhdl/lists.py +++ b/pyGHDL/libghdl/vhdl/lists.py @@ -68,14 +68,14 @@ def Iterate(List) -> Iterator: :return: Iterator structure. """ func = libghdl.vhdl__lists__iterate - func.argstype = [(c_int32)] + func.argstype = [c_int32] func.restype = Iterator return func(List) @export -def Is_Valid(Iterator) -> bool: +def Is_Valid(it: Iterator) -> bool: """ Check if iterator reached the end. @@ -86,11 +86,11 @@ def Is_Valid(Iterator) -> bool: func.argstype = [POINTER(Iterator)] func.restype = c_bool - return func(Iterator) + return func(it) @export -def Next(Iterator): +def Next(it: Iterator): """ Move iterator to the next element. @@ -101,11 +101,11 @@ def Next(Iterator): func.argstype = [POINTER(Iterator)] func.restype = None - func(Iterator) + func(it) @export -def Get_Element(Iterator) -> int: +def Get_Element(it: Iterator) -> int: """ Get the current element from iterator. @@ -116,7 +116,7 @@ def Get_Element(Iterator) -> int: func.argstype = [POINTER(Iterator)] func.restype = c_int32 - return func(Iterator) + return func(it) @export @@ -130,14 +130,14 @@ def Get_Nbr_Elements(List) -> int: :return: Number of list elements. """ func = libghdl.vhdl__lists__get_nbr_elements - func.argtype = [(c_int32)] + func.argtype = [c_int32] func.restype = c_int32 return func(List) @export -def Create_Iir_List(): +def Create_Iir_List() -> int: """ Create a list. |