summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api_test/cplusplus.cpp4
-rw-r--r--api_test/cplusplus.h17
-rw-r--r--api_test/main.c4
3 files changed, 20 insertions, 5 deletions
diff --git a/api_test/cplusplus.cpp b/api_test/cplusplus.cpp
index ea64b06..b6228a3 100644
--- a/api_test/cplusplus.cpp
+++ b/api_test/cplusplus.cpp
@@ -1,10 +1,10 @@
#include <cstdlib>
#include "cmark.h"
-
+#include "cplusplus.h"
#include "harness.h"
-extern "C" void
+void
test_cplusplus(test_batch_runner *runner)
{
static const char md[] = "paragraph\n";
diff --git a/api_test/cplusplus.h b/api_test/cplusplus.h
new file mode 100644
index 0000000..68edcb2
--- /dev/null
+++ b/api_test/cplusplus.h
@@ -0,0 +1,17 @@
+#ifndef CMARK_API_TEST_CPLUSPLUS_H
+#define CMARK_API_TEST_CPLUSPLUS_H
+
+#include "harness.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void
+test_cplusplus(test_batch_runner *runner);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/api_test/main.c b/api_test/main.c
index fae1d05..d2e41d3 100644
--- a/api_test/main.c
+++ b/api_test/main.c
@@ -7,12 +7,10 @@
#include "node.h"
#include "harness.h"
+#include "cplusplus.h"
#define UTF8_REPL "\xEF\xBF\xBD"
-void
-test_cplusplus(test_batch_runner *runner);
-
static const cmark_node_type node_types[] = {
CMARK_NODE_DOCUMENT,
CMARK_NODE_BLOCK_QUOTE,