aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-01-06 11:27:59 +0100
committertgingold <tgingold@users.noreply.github.com>2021-01-10 10:14:16 +0100
commit0de91f9313a4c76445ada1617fff69d97fe12217 (patch)
tree1e5074682a4996db4d54ac9b6c92e8745f05d753 /pyGHDL/dom
parent015adfc69e63e46c7823524032636faa99106c1f (diff)
downloadghdl-0de91f9313a4c76445ada1617fff69d97fe12217.tar.gz
ghdl-0de91f9313a4c76445ada1617fff69d97fe12217.tar.bz2
ghdl-0de91f9313a4c76445ada1617fff69d97fe12217.zip
Make API more pythonic be replacing C-like byte arrays with str. Abstracted utf-8 encoding/decoding.
Diffstat (limited to 'pyGHDL/dom')
-rw-r--r--pyGHDL/dom/Common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyGHDL/dom/Common.py b/pyGHDL/dom/Common.py
index 4e02b9678..faa4cc0db 100644
--- a/pyGHDL/dom/Common.py
+++ b/pyGHDL/dom/Common.py
@@ -72,9 +72,9 @@ class GHDLMixin:
}
@classmethod
- def _ghdlNodeToName(cls, node):
+ def _ghdlNodeToName(cls, node) -> str:
"""Return the python string from node :obj:`node` identifier"""
- return name_table.Get_Name_Ptr(nodes.Get_Identifier(node)).decode("utf-8")
+ return name_table.Get_Name_Ptr(nodes.Get_Identifier(node))
@classmethod
def _ghdlPortToMode(cls, port):