231128.5 · 6b82dd3c47c5eee8a7fcca063c683caafd5cdd9a
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>
reading declarations
Changes to src/jq.h. All files
@@ -4,6 +4,10 @@ #include <stdio.h> #include "jv.h" +#ifdef __cplusplus+extern "C" {+#endif+ enum { JQ_DEBUG_TRACE = 1, JQ_DEBUG_TRACE_DETAIL = 2,@@ -69,4 +73,8 @@ jv jq_util_input_get_current_line(jq_state*); int jq_set_colors(const char *); +#ifdef __cplusplus+}+#endif+ #endif /* !JQ_H */