aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-29 17:58:12 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-29 17:58:12 +0100
commite3a6c03b42500262a4048dd32def12623cfb2619 (patch)
tree09fe2efe2d20687717e66f90e3af2694b27628fd /contrib
parenteb0ec636b6545843d135379351d2a7280ee6e397 (diff)
downloadrspamd-e3a6c03b42500262a4048dd32def12623cfb2619.tar.gz
rspamd-e3a6c03b42500262a4048dd32def12623cfb2619.zip
[Minor] Add C++ safe guards
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fastutf8/fastutf8.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/fastutf8/fastutf8.h b/contrib/fastutf8/fastutf8.h
index 001499ab3..a1e9cbf03 100644
--- a/contrib/fastutf8/fastutf8.h
+++ b/contrib/fastutf8/fastutf8.h
@@ -29,6 +29,9 @@
#include <stdbool.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
enum rspamd_fast_utf8_cpu_flags {
RSPAMD_FAST_UTF8_FLAG_SSE41 = 1u << 0u,
RSPAMD_FAST_UTF8_FLAG_AVX2 = 1u << 1u,
@@ -38,7 +41,7 @@ enum rspamd_fast_utf8_cpu_flags {
* Called to init codecs
* @param flags
*/
-void rspamd_fast_utf8_library_init (unsigned flags);
+void rspamd_fast_utf8_library_init(unsigned flags);
/**
* Called to validate input using fast codec
@@ -46,7 +49,7 @@ void rspamd_fast_utf8_library_init (unsigned flags);
* @param len
* @return
*/
-off_t rspamd_fast_utf8_validate (const unsigned char *data, size_t len);
+off_t rspamd_fast_utf8_validate(const unsigned char *data, size_t len);
/**
* Use plain C implementation
@@ -54,6 +57,9 @@ off_t rspamd_fast_utf8_validate (const unsigned char *data, size_t len);
* @param len
* @return
*/
-off_t rspamd_fast_utf8_validate_ref (const unsigned char *data, size_t len);
+off_t rspamd_fast_utf8_validate_ref(const unsigned char *data, size_t len);
+#ifdef __cplusplus
+}
+#endif
#endif