From 78f204d79c9ed61815a7eb206f2c1a4f4df289a0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 2 Jul 2021 00:09:26 +0200 Subject: add extern C for c++ for header --- include/HtmlParser.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/HtmlParser.h b/include/HtmlParser.h index 0bd7203..e6f0c3b 100644 --- a/include/HtmlParser.h +++ b/include/HtmlParser.h @@ -8,6 +8,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { const char *data; size_t size; @@ -52,4 +56,8 @@ struct HtmlParser { /* Note: HTML_PARSE_TAG_START is guaranteed to be called for a tag before HTML_PARSE_TAG_END */ void html_parser_parse(const char *html_source, size_t len, HtmlParseCallback parse_callback, void *userdata); +#ifdef __cplusplus +} +#endif + #endif /* HTML_PARSER_H */ -- cgit v1.2.3