aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/python
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-10-05 20:42:22 +0200
committerTristan Gingold <tgingold@free.fr>2017-10-05 20:42:22 +0200
commitda6dd57e9e5ee865cbd0cc9246eebcad957adae6 (patch)
tree7637b8857014b59dc65ca8a3ec55e5cfd01af17b /src/vhdl/python
parentf3927d7bcc1540f8ea194b04b302260b03112de6 (diff)
downloadghdl-da6dd57e9e5ee865cbd0cc9246eebcad957adae6.tar.gz
ghdl-da6dd57e9e5ee865cbd0cc9246eebcad957adae6.tar.bz2
ghdl-da6dd57e9e5ee865cbd0cc9246eebcad957adae6.zip
python binding: add interfaces.
Diffstat (limited to 'src/vhdl/python')
-rw-r--r--src/vhdl/python/libghdl/thin.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vhdl/python/libghdl/thin.py b/src/vhdl/python/libghdl/thin.py
index f8b5f3eac..6565045f6 100644
--- a/src/vhdl/python/libghdl/thin.py
+++ b/src/vhdl/python/libghdl/thin.py
@@ -42,6 +42,10 @@ location_File_Line_To_Col = libghdl.files_map__location_file_line_to_col
Get_File_Buffer = libghdl.files_map__get_file_buffer
Get_File_Buffer.restype = c_char_p
+Read_Source_File = libghdl.files_map__read_source_file
+
+No_Source_File_Entry = 0
+
# Names
Get_Name_Length = libghdl.name_table__get_name_length
@@ -49,6 +53,11 @@ Get_Name_Length = libghdl.name_table__get_name_length
Get_Name_Ptr = libghdl.name_table__get_name_ptr
Get_Name_Ptr.restype = c_char_p
+_Get_Identifier_With_Len = libghdl.name_table__get_identifier_with_len
+
+def Get_Identifier(s):
+ return _Get_Identifier_With_Len(c_char_p(s), len(s))
+
# std.standard
Standard_Package = c_int32.in_dll(libghdl, "std_package__standard_package")