diff options
author | tgingold <tgingold@users.noreply.github.com> | 2020-12-29 17:19:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 17:19:09 +0100 |
commit | 7ca54117b8f757396ba5ef04c83ff1228ca94384 (patch) | |
tree | cc5f7f4166cc0570bda5cf2047d3ef7abbc36e37 /pyGHDL/libghdl/errorout_memory.py | |
parent | 340fc792bba2ffdb4f930bc427a39ea3a1b659b2 (diff) | |
parent | 50adcf884c3cfa4e33ca45769295f163baa63a3e (diff) | |
download | ghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.tar.gz ghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.tar.bz2 ghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.zip |
Merge pull request #1556 from Paebbels/paebbels/pyGHDL
Cleanup and Restructuring of pyGHDL
Diffstat (limited to 'pyGHDL/libghdl/errorout_memory.py')
-rw-r--r-- | pyGHDL/libghdl/errorout_memory.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pyGHDL/libghdl/errorout_memory.py b/pyGHDL/libghdl/errorout_memory.py new file mode 100644 index 000000000..9dc283f75 --- /dev/null +++ b/pyGHDL/libghdl/errorout_memory.py @@ -0,0 +1,34 @@ +from pyGHDL.libghdl import libghdl +from ctypes import c_int8, c_int32, c_char_p, Structure + + +class Error_Message(Structure): + _fields_ = [ + ("id", c_int8), + ("group", c_int8), + ("file", c_int32), + ("line", c_int32), + ("offset", c_int32), + ("length", c_int32), + ] + + +# Values for group: +Msg_Single = 0 +Msg_Main = 1 +Msg_Related = 2 +Msg_Last = 3 + +Install_Handler = libghdl.errorout__memory__install_handler + +Get_Nbr_Messages = libghdl.errorout__memory__get_nbr_messages + +Get_Error_Record = libghdl.errorout__memory__get_error_record +Get_Error_Record.argstypes = [c_int32] +Get_Error_Record.restype = Error_Message + +Get_Error_Message = libghdl.errorout__memory__get_error_message_addr +Get_Error_Message.argstype = [c_int32] +Get_Error_Message.restype = c_char_p + +Clear_Errors = libghdl.errorout__memory__clear_errors |