libjq: extern C for C++

If using libjq from C++ it would be nice to not need to do this at the
import site, so just extern "C" to the public headers for libjq

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
This commit is contained in:
Tyler Rockwood authored and GitHub committed 2023-11-28 22:50:25 +01:00
1 parent 460a5c12b4
commit 6b82dd3c47
2 files changed
+15

No files matched your search

+7
View File
@@ -5,6 +5,10 @@
#include <stdint.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
#if (defined(__GNUC__) && __GNUC__ >= 7) || \
(defined(__clang__) && __clang_major__ >= 10)
# define JQ_FALLTHROUGH __attribute__((fallthrough))
@@ -260,6 +264,9 @@ int jv_cmp(jv, jv);
jv jv_group(jv, jv);
jv jv_sort(jv, jv);
#ifdef __cplusplus
}
#endif
#endif