]> sigrok.org Git - libsigrokdecode.git/blobdiff - sigrokdecode.h.in
Doxygen: Document how to mark private stuff.
[libsigrokdecode.git] / sigrokdecode.h.in
index b158e37079778f47ff5d85943a44412f3b43259e..033e30ee4652e557097c2facd5f62998eebde4db 100644 (file)
@@ -99,20 +99,31 @@ extern "C" {
  * Use SRD_API to mark public API symbols, and SRD_PRIV for private symbols.
  *
  * Variables and functions marked 'static' are private already and don't
- * need SR_PRIV. However, functions which are not static (because they need
+ * need SRD_PRIV. However, functions which are not static (because they need
  * to be used in other libsigrokdecode-internal files) but are also not
  * meant to be part of the public libsigrokdecode API, must use SRD_PRIV.
  *
  * This uses the 'visibility' feature of gcc (requires gcc >= 4.0).
  *
+ * This feature is not available on MinGW/Windows, as it is a feature of
+ * ELF files and MinGW/Windows uses PE files.
+ *
  * Details: http://gcc.gnu.org/wiki/Visibility
  */
 
 /* Marks public libsigrokdecode API symbols. */
+#ifndef _WIN32
 #define SRD_API __attribute__((visibility("default")))
+#else
+#define SRD_API
+#endif
 
 /* Marks private, non-public libsigrokdecode symbols (not part of the API). */
+#ifndef _WIN32
 #define SRD_PRIV __attribute__((visibility("hidden")))
+#else
+#define SRD_PRIV
+#endif
 
 /*
  * When adding an output type, don't forget to...
@@ -257,7 +268,7 @@ SRD_API int srd_pd_output_callback_add(int output_type,
 
 /*--- decoder.c -------------------------------------------------------------*/
 
-SRD_API GSList *srd_decoder_list(void);
+SRD_API const GSList *srd_decoder_list(void);
 SRD_API struct srd_decoder *srd_decoder_get_by_id(const char *id);
 SRD_API int srd_decoder_load(const char *name);
 SRD_API int srd_decoder_unload(struct srd_decoder *dec);