summaryrefslogtreecommitdiff
path: root/wrappers/python/eduvpn_common/loader.py
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-10-18 10:55:34 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-10-18 15:01:13 +0200
commitf152d42f66feb4120a0c231eb941a367a3bf2271 (patch)
tree8b241ef210cb4916316502dd4c2d8959cc3d8346 /wrappers/python/eduvpn_common/loader.py
parentd6b10d67deb142ad7dedeee9eebb66079b69e328 (diff)
Python: Add docstrings
Diffstat (limited to 'wrappers/python/eduvpn_common/loader.py')
-rw-r--r--wrappers/python/eduvpn_common/loader.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py
index 170437a..f299f94 100644
--- a/wrappers/python/eduvpn_common/loader.py
+++ b/wrappers/python/eduvpn_common/loader.py
@@ -18,7 +18,12 @@ from eduvpn_common.types import (
)
-def load_lib():
+def load_lib() -> CDLL:
+ """The function that loads the Go shared library
+
+ :return: The Go shared library loaded with cdll.LoadLibrary from ctypes
+ :rtype: CDLL
+ """
lib_prefixes = defaultdict(
lambda: "lib",
{
@@ -51,7 +56,12 @@ def load_lib():
return lib
-def initialize_functions(lib: CDLL):
+def initialize_functions(lib: CDLL) -> None:
+ """Initializes the Go shared library functions
+
+ :param lib: CDLL: The Go shared library
+
+ """
# Exposed functions
# We have to use c_void_p instead of c_char_p to free it properly
# See https://stackoverflow.com/questions/13445568/python-ctypes-how-to-free-memory-getting-invalid-pointer-error