commit 2ea9346dfa6a1c4c404e996c23084e15eeb2588a
parent 5c2f11217d8feda664b828c5741be467b355cf0a
Author: Eduardo Fontana Lazzari <edufonlaz@gmail.com>
Date: Thu, 23 Jan 2025 12:12:30 +0100
Add comments that clarify c concepts
Diffstat:
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/sphin.h b/src/sphin.h
@@ -28,10 +28,11 @@
#include <rsys/rsys.h>
/* Library symbol management */
-#if defined(SPHIN_SHARED_BUILD)
- #define SPHIN_API extern EXPORT_SYM
+#if defined(SPHIN_SHARED_BUILD) /* Directive defined only when building
+ star-phor-input (see Makefile) */
+ #define SPHIN_API extern EXPORT_SYM /* When building star-phor-input */
#else
- #define SPHIN_API extern IMPORT_SYM
+ #define SPHIN_API extern IMPORT_SYM /* When using star-phor-input */
#endif
/* Helper macro that asserts if the invocation of the sphin function `Func'
@@ -52,8 +53,11 @@ static const struct sphin_create_args SPHIN_CREATE_ARGS_DEFAULT = {
NULL, NULL, 0
};
-/* Forward declaration */
-struct sphin;
+/* Forward declaration
+ * We declare the structure sphin, but its representation remains opaque to the
+ * users of the programming interface exposed by star-phor-input. Thus, the user
+ * must use the functions exposed by the library to manipulate this structure. */
+struct sphin; /* Library handler */
struct sphin_config; /* Physical configuration */
BEGIN_DECLS