aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-07-19 19:38:30 +0200
committerTristan Gingold <tgingold@free.fr>2021-07-19 19:38:30 +0200
commitc55a78a1bb4c86ff8784a6ce470c08797f8f02f6 (patch)
treec16826b04e327dbb976e89677042530d82be9cab
parent2f4003fa0fc27a61d0c79a54280dfe6869784f0b (diff)
downloadghdl-c55a78a1bb4c86ff8784a6ce470c08797f8f02f6.tar.gz
ghdl-c55a78a1bb4c86ff8784a6ce470c08797f8f02f6.tar.bz2
ghdl-c55a78a1bb4c86ff8784a6ce470c08797f8f02f6.zip
files_map.py: Add get_buffer_length
-rw-r--r--pyGHDL/libghdl/files_map.py11
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: