aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYury A. Rogovsky <rogovsky@gmail.com>2019-10-06 09:53:24 +0700
committerYury A. Rogovsky <rogovsky@gmail.com>2019-10-06 09:53:24 +0700
commit1dafce77253cd9f1f1a636e095c3dbf913b86ab6 (patch)
tree48341f9823ff97334d1a76cccf83b471a8bfe7d7
parente29a945add3283b08d36f7f938002fee07326d53 (diff)
downloadlibgha-1dafce77253cd9f1f1a636e095c3dbf913b86ab6.tar.gz
Guards in header was added for beeing used with C++.
Guards in header file was added to prevent function's name mangling (i.e. altering the name of the funtion in object -or library- files) while beeing compiled with C++.
-rw-r--r--include/libgha.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/libgha.h b/include/libgha.h
index 755f997..f3221f8 100644
--- a/include/libgha.h
+++ b/include/libgha.h
@@ -1,6 +1,11 @@
#ifndef LIBGHA_H
#define LIBGHA_H
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
#define FLOAT float
#include <stddef.h>
@@ -81,4 +86,8 @@ int gha_adjust_info(const FLOAT* pcm, struct gha_info* info, size_t k, gha_ctx_t
*/
void gha_set_user_resuidal_cb(void (*cb)(FLOAT* resuidal, size_t size, void* user_ctx), void* user_ctx, gha_ctx_t ctx);
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif