From c271eb36656a4ff88a9c8c1d59934949260275a3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 8 Jul 2019 15:22:05 +0100 Subject: [Rework] Add C++ guards to all headers --- src/libmime/lang_detection.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/libmime/lang_detection.h') diff --git a/src/libmime/lang_detection.h b/src/libmime/lang_detection.h index 517ab037e..3eaa4e286 100644 --- a/src/libmime/lang_detection.h +++ b/src/libmime/lang_detection.h @@ -22,6 +22,10 @@ #include "libstat/stat_api.h" #include "libmime/message.h" +#ifdef __cplusplus +extern "C" { +#endif + struct rspamd_lang_detector; struct rspamd_language_elt; struct rspamd_task; @@ -57,10 +61,11 @@ struct rspamd_lang_detector_res { * @param cfg * @return */ -struct rspamd_lang_detector* rspamd_language_detector_init (struct rspamd_config *cfg); +struct rspamd_lang_detector *rspamd_language_detector_init (struct rspamd_config *cfg); + +struct rspamd_lang_detector *rspamd_language_detector_ref (struct rspamd_lang_detector *d); -struct rspamd_lang_detector* rspamd_language_detector_ref (struct rspamd_lang_detector* d); -void rspamd_language_detector_unref (struct rspamd_lang_detector* d); +void rspamd_language_detector_unref (struct rspamd_lang_detector *d); /** * Try to detect language of words @@ -70,8 +75,8 @@ void rspamd_language_detector_unref (struct rspamd_lang_detector* d); * @return array of struct rspamd_lang_detector_res sorted by freq descending */ gboolean rspamd_language_detector_detect (struct rspamd_task *task, - struct rspamd_lang_detector *d, - struct rspamd_mime_text_part *part); + struct rspamd_lang_detector *d, + struct rspamd_mime_text_part *part); /** * Returns TRUE if the specified word is known to be a stop word @@ -81,6 +86,11 @@ gboolean rspamd_language_detector_detect (struct rspamd_task *task, * @return */ gboolean rspamd_language_detector_is_stop_word (struct rspamd_lang_detector *d, - const gchar *word, gsize wlen); + const gchar *word, gsize wlen); + + +#ifdef __cplusplus +} +#endif #endif -- cgit v1.2.3