aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buffer.h8
-rw-r--r--src/inlines.h8
-rw-r--r--src/references.h8
-rw-r--r--src/scanners.h8
-rw-r--r--src/scanners.re1
-rw-r--r--src/utf8.h8
6 files changed, 41 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index fa1639e..d14b38e 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -6,6 +6,10 @@
#include "config.h"
#include "cmark_export.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
unsigned char *ptr;
int asize, size;
@@ -164,4 +168,8 @@ void cmark_strbuf_unescape(cmark_strbuf *s);
#define strbuf_unescape cmark_strbuf_unescape
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/inlines.h b/src/inlines.h
index ae2117e..b323416 100644
--- a/src/inlines.h
+++ b/src/inlines.h
@@ -1,6 +1,10 @@
#ifndef CMARK_INLINES_H
#define CMARK_INLINES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
unsigned char *cmark_clean_url(cmark_chunk *url);
unsigned char *cmark_clean_title(cmark_chunk *title);
@@ -15,4 +19,8 @@ int cmark_parse_reference_inline(cmark_strbuf *input, cmark_reference_map *refma
#define clean_title cmark_clean_title
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/references.h b/src/references.h
index 2972576..9f423ab 100644
--- a/src/references.h
+++ b/src/references.h
@@ -4,6 +4,10 @@
#include "chunk.h"
#include "ast.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
cmark_reference_map *cmark_reference_map_new(void);
void cmark_reference_map_free(cmark_reference_map *map);
cmark_reference* cmark_reference_lookup(cmark_reference_map *map, cmark_chunk *label);
@@ -18,4 +22,8 @@ extern void cmark_reference_create(cmark_reference_map *map, cmark_chunk *label,
#define reference_create cmark_reference_create
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/scanners.h b/src/scanners.h
index 243a970..3269112 100644
--- a/src/scanners.h
+++ b/src/scanners.h
@@ -1,5 +1,9 @@
#include "cmark.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int _scan_at(int (*scanner)(const unsigned char *), chunk *c, int offset);
int _scan_autolink_uri(const unsigned char *p);
int _scan_autolink_email(const unsigned char *p);
@@ -28,3 +32,7 @@ int _scan_entity(const unsigned char *p);
#define scan_open_code_fence(c, n) _scan_at(&_scan_open_code_fence, c, n)
#define scan_close_code_fence(c, n) _scan_at(&_scan_close_code_fence, c, n)
#define scan_entity(c, n) _scan_at(&_scan_entity, c, n)
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/scanners.re b/src/scanners.re
index 3dba1f0..5e74873 100644
--- a/src/scanners.re
+++ b/src/scanners.re
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include "chunk.h"
+#include "scanners.h"
int _scan_at(int (*scanner)(const unsigned char *), chunk *c, int offset)
{
diff --git a/src/utf8.h b/src/utf8.h
index ecefa4e..4114063 100644
--- a/src/utf8.h
+++ b/src/utf8.h
@@ -4,10 +4,18 @@
#include <stdint.h>
#include "buffer.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str, int len);
void utf8proc_encode_char(int32_t uc, cmark_strbuf *buf);
int utf8proc_iterate(const uint8_t *str, int str_len, int32_t *dst);
int utf8proc_charlen(const uint8_t *str, int str_len);
void utf8proc_detab(cmark_strbuf *dest, const uint8_t *line, size_t size);
+#ifdef __cplusplus
+}
+#endif
+
#endif