From 1b4d53f301e31fb5e4fbe687741367b938377009 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Wed, 31 Dec 2014 16:10:50 +0100 Subject: Fix C++ API test --- api_test/cplusplus.cpp | 4 ++-- api_test/cplusplus.h | 17 +++++++++++++++++ api_test/main.c | 4 +--- 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 api_test/cplusplus.h (limited to 'api_test') 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 #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, -- cgit v1.2.3