summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-12-31 15:30:26 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-12-31 16:52:49 +0100
commit7787301eda4cbe4476a73241579c1838f6153279 (patch)
treeba7520f2e04c2610757683baa0f93e29f3ac885a /src
parent0e38a3706039607fb276228648f726ca9e15f6f0 (diff)
Include guards and C linkage for cmark_ctype.h
Diffstat (limited to 'src')
-rw-r--r--src/cmark_ctype.c2
-rw-r--r--src/cmark_ctype.h13
2 files changed, 15 insertions, 0 deletions
diff --git a/src/cmark_ctype.c b/src/cmark_ctype.c
index 8805b9a..a3871a8 100644
--- a/src/cmark_ctype.c
+++ b/src/cmark_ctype.c
@@ -1,5 +1,7 @@
#include <stdint.h>
+#include "cmark_ctype.h"
+
/** 1 = space, 2 = punct, 3 = digit, 4 = alpha, 0 = other
*/
static const int8_t cmark_ctype_class[256] = {
diff --git a/src/cmark_ctype.h b/src/cmark_ctype.h
index 7423f80..f803946 100644
--- a/src/cmark_ctype.h
+++ b/src/cmark_ctype.h
@@ -1,3 +1,10 @@
+#ifndef CMARK_CMARK_CTYPE_H
+#define CMARK_CMARK_CTYPE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Locale-independent versions of functions from ctype.h.
* We want cmark to behave the same no matter what the system locale.
*/
@@ -9,3 +16,9 @@ int cmark_ispunct(char c);
int cmark_isalnum(char c);
int cmark_isdigit(char c);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif