diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-07-19 19:38:30 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-07-19 19:38:30 +0200 |
commit | c55a78a1bb4c86ff8784a6ce470c08797f8f02f6 (patch) | |
tree | c16826b04e327dbb976e89677042530d82be9cab /pyGHDL/libghdl/files_map.py | |
parent | 2f4003fa0fc27a61d0c79a54280dfe6869784f0b (diff) | |
download | ghdl-c55a78a1bb4c86ff8784a6ce470c08797f8f02f6.tar.gz ghdl-c55a78a1bb4c86ff8784a6ce470c08797f8f02f6.tar.bz2 ghdl-c55a78a1bb4c86ff8784a6ce470c08797f8f02f6.zip |
files_map.py: Add get_buffer_length
Diffstat (limited to 'pyGHDL/libghdl/files_map.py')
-rw-r--r-- | pyGHDL/libghdl/files_map.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pyGHDL/libghdl/files_map.py b/pyGHDL/libghdl/files_map.py index d57de13cc..551f13d64 100644 --- a/pyGHDL/libghdl/files_map.py +++ b/pyGHDL/libghdl/files_map.py @@ -220,6 +220,17 @@ def Set_File_Length(File: SourceFileEntry, Length: int) -> None: return 0 +@export +@BindToLibGHDL("files_map__get_buffer_length") +def Get_Buffer_Length(File: SourceFileEntry) -> int: + """ + Get the length of the buffer, including the gap and the two EOT. + + :param File: Source file + :return: Type: ``Source_Ptr`` + """ + + # @export @BindToLibGHDL("files_map__read_source_file") def Read_Source_File(Directory: NameId, Name: NameId) -> SourceFileEntry: |