summaryrefslogtreecommitdiff
path: root/doc/init.rst
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2023-02-10 15:27:06 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2023-02-10 15:27:06 +0100
commit7501bff8432444b7ae8e7f3d9289c0d61f3f0b64 (patch)
treebd53603f464c3747e897a8996158a0fef7b41bc3 /doc/init.rst
parent0f124df68d87c9073f76efeff1a901a69b1f3e13 (diff)
parent9e9336185f86bd97ff22f54e4d561c2cccccecf5 (diff)
Merge branch 'release/debian/4.10-1'debian/4.10-1
Diffstat (limited to 'doc/init.rst')
-rw-r--r--doc/init.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/init.rst b/doc/init.rst
new file mode 100644
index 0000000..ebaa4d8
--- /dev/null
+++ b/doc/init.rst
@@ -0,0 +1,17 @@
+Initialization
+==============
+
+.. code-block:: c
+
+ #include <libHX/init.h>
+
+ int HX_init(void);
+ void HX_exit(void);
+
+Before using the library's functions, ``HX_init`` must be called. This function
+will initialize any needed state libHX needs for itself, if any. It is designed
+to be invoked multiple times, such as for example, from different libraries
+linking to libHX itself, and will refcount. On success, >0 is returned. If
+there was an error, it will return a negative error code or zero. ``HX_exit``
+is the logical counterpart of notifying that the library is no longer used.
+