aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/Misc.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-01-06 01:41:32 +0100
committertgingold <tgingold@users.noreply.github.com>2021-01-10 10:14:16 +0100
commitc633188e24e35aeb540b89ab142efabef0801f13 (patch)
tree36564458f3901bb826545afea56a7b3c9c0c94d8 /pyGHDL/dom/Misc.py
parent4a55232c3461a370c08b6c8a05a42011655c22a0 (diff)
downloadghdl-c633188e24e35aeb540b89ab142efabef0801f13.tar.gz
ghdl-c633188e24e35aeb540b89ab142efabef0801f13.tar.bz2
ghdl-c633188e24e35aeb540b89ab142efabef0801f13.zip
Adding types and docstrings to libghdl.
Diffstat (limited to 'pyGHDL/dom/Misc.py')
-rw-r--r--pyGHDL/dom/Misc.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pyGHDL/dom/Misc.py b/pyGHDL/dom/Misc.py
index 4f931f15d..4eeb45b61 100644
--- a/pyGHDL/dom/Misc.py
+++ b/pyGHDL/dom/Misc.py
@@ -71,12 +71,13 @@ class Design(VHDLModel_Design):
# Collect error messages in memory
errorout_memory.Install_Handler()
- libghdl.set_option(b"--std=08")
+ libghdl.set_option("--std=08")
# Finish initialization. This will load the standard package.
if libghdl.analyze_init_status() != 0:
raise LibGHDLException("Error initializing 'libghdl'.")
+
@export
class Library(VHDLModel_Library):
pass
@@ -97,7 +98,7 @@ class Document(VHDLModel_Document):
def __ghdl_init(self):
# Read input file
- self.__ghdlFileID = name_table.Get_Identifier(str(self.Path).encode("utf_8"))
+ self.__ghdlFileID = name_table.Get_Identifier(str(self.Path))
self.__ghdlSourceFileEntry = files_map.Read_Source_File(name_table.Null_Identifier, self.__ghdlFileID)
if self.__ghdlSourceFileEntry == files_map.No_Source_File_Entry:
raise LibGHDLException("Cannot load file '{!s}'".format(self.Path))