diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-08 15:22:05 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-08 15:22:05 +0100 |
commit | c271eb36656a4ff88a9c8c1d59934949260275a3 (patch) | |
tree | 3dd586e38b5b37cfebc7c12b6ff6f434904167c7 /src/libmime/lang_detection.h | |
parent | b266445f47dec06392a7e058f499325fa3c052b9 (diff) | |
download | rspamd-c271eb36656a4ff88a9c8c1d59934949260275a3.tar.gz rspamd-c271eb36656a4ff88a9c8c1d59934949260275a3.zip |
[Rework] Add C++ guards to all headers
Diffstat (limited to 'src/libmime/lang_detection.h')
-rw-r--r-- | src/libmime/lang_detection.h | 22 |
1 files changed, 16 insertions, 6 deletions
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 |