From 159e0bfdbb135e74aac10e54c7a499e9e34aa5a2 Mon Sep 17 00:00:00 2001 From: 1138-4EB <1138-4EB@users.noreply.github.com> Date: Mon, 17 Jun 2019 03:38:27 +0200 Subject: Rework libghdl build/install procedure (#840) * feat(libghdl): add libghdl_pkg.py, add option to generate libghdl-py.tgz with dist/travis/build.sh * libghdl*.so is now part of GHDL * move python sources to python/libghdl and python/pnodes * rename src/vhdl/python to src/vhdl/libghdl * add generation of tarball for libghdl-py to the makefile * deprecate --enable-python and --disable-python * add configuration option --disable-libghdl * feat(python/libghdl): add support for LIBGHDL_PREFIX (#844) * fix(travis): disable libghdl on mac * feat(python/libghdl): add support for GHDL_BIN_PATH and VUNIT_GHDL_PATH --- python/libghdl/thin/errorout_memory.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 python/libghdl/thin/errorout_memory.py (limited to 'python/libghdl/thin/errorout_memory.py') diff --git a/python/libghdl/thin/errorout_memory.py b/python/libghdl/thin/errorout_memory.py new file mode 100644 index 000000000..8027795df --- /dev/null +++ b/python/libghdl/thin/errorout_memory.py @@ -0,0 +1,31 @@ +from 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 -- cgit v1.2.3