aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/libghdl/files_map.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/libghdl/files_map.py
parent4a55232c3461a370c08b6c8a05a42011655c22a0 (diff)
downloadghdl-c633188e24e35aeb540b89ab142efabef0801f13.tar.gz
ghdl-c633188e24e35aeb540b89ab142efabef0801f13.tar.bz2
ghdl-c633188e24e35aeb540b89ab142efabef0801f13.zip
Adding types and docstrings to libghdl.
Diffstat (limited to 'pyGHDL/libghdl/files_map.py')
-rw-r--r--pyGHDL/libghdl/files_map.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pyGHDL/libghdl/files_map.py b/pyGHDL/libghdl/files_map.py
index 708b20181..195b1d70e 100644
--- a/pyGHDL/libghdl/files_map.py
+++ b/pyGHDL/libghdl/files_map.py
@@ -7,12 +7,13 @@
# |_| |___/ |___/
# =============================================================================
# Authors: Tristan Gingold
+# Patrick Lehmann
#
# Package package: Python binding and low-level API for shared library 'libghdl'.
#
# License:
# ============================================================================
-# Copyright (C) 2019-2020 Tristan Gingold
+# Copyright (C) 2019-2021 Tristan Gingold
#
# GHDL is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
@@ -34,7 +35,10 @@
#
from ctypes import c_void_p
+from pydecor import export
+
from pyGHDL.libghdl import libghdl
+from pyGHDL.libghdl._types import NameId, SourceFileEntry
EOT = b"\x04"
@@ -69,7 +73,9 @@ Get_File_Buffer.restype = c_void_p
Get_File_Length = libghdl.files_map__get_file_length
Set_File_Length = libghdl.files_map__set_file_length
-Read_Source_File = libghdl.files_map__read_source_file
+@export
+def Read_Source_File(DirectoryId: NameId, NameId: NameId) -> SourceFileEntry:
+ return libghdl.files_map__read_source_file(DirectoryId, NameId)
Reserve_Source_File = libghdl.files_map__reserve_source_file