aboutsummaryrefslogtreecommitdiffstats
path: root/python/libghdl/thin/vhdl/lists.py
blob: 8fc18007306244b5990c769c07392d2ebecfe9d6 (plain)
1
2
3
4
5
6
7
8
9
10
pre { line-height: 125%; margin: 0; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #ffffff; }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color
from libghdl import libghdl
from ctypes import c_int32, c_bool, POINTER, Structure

List_Type = c_int32

class Iterator(Structure):
    _fields_ = [("chunk", c_int32),
                ("chunk_idx", c_int32),
                ("remain", c_int32)]

Iterate = libghdl.vhdl__lists__iterate
Iterate.argstype = [List_Type]
Iterate.restype = Iterator

Is_Valid = libghdl.vhdl__lists__is_valid
Is_Valid.argstype = [POINTER(Iterator)]
Is_Valid.restype = c_bool

Next = libghdl.vhdl__lists__next
Next.argstype = [POINTER(Iterator)]
Next.restype = None

Get_Element = libghdl.vhdl__lists__get_element
Get_Element.argstype = [POINTER(Iterator)]
Get_Element.restype = c_int32

Get_Nbr_Elements = libghdl.vhdl__lists__get_nbr_elements
Get_Nbr_Elements.argtype = [List_Type]
Get_Nbr_Elements.restype = c_int32

Create_Iir_List = libghdl.vhdl__lists__create_list

Destroy_Iir_List = libghdl.vhdl__lists__destroy_list
id=cgit -->