diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-18 14:56:16 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-18 14:56:16 +0000 |
commit | 6b2b4167187fee09365271cca182866ecb029af3 (patch) | |
tree | a085717bc896b25ff4280eb86abecca0d5c36767 /src/libmime/lang_detection.c | |
parent | 47bcfc8360dfa1754474580e779314b8d6a78da6 (diff) | |
download | rspamd-6b2b4167187fee09365271cca182866ecb029af3.tar.gz rspamd-6b2b4167187fee09365271cca182866ecb029af3.zip |
[Rework] Remove some of the GLib types in lieu of standard ones
This types have constant conflicts with the system ones especially on OSX.
Diffstat (limited to 'src/libmime/lang_detection.c')
-rw-r--r-- | src/libmime/lang_detection.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libmime/lang_detection.c b/src/libmime/lang_detection.c index c485de5ad..0321ee7df 100644 --- a/src/libmime/lang_detection.c +++ b/src/libmime/lang_detection.c @@ -938,10 +938,10 @@ end: static void rspamd_language_detector_random_select(GArray *ucs_tokens, guint nwords, goffset *offsets_out, - guint64 *seed) + uint64_t *seed) { guint step_len, remainder, i, out_idx; - guint64 coin, sel; + uint64_t coin, sel; rspamd_stat_token_t *tok; g_assert(nwords != 0); @@ -1232,7 +1232,7 @@ rspamd_language_detector_detect_type(struct rspamd_task *task, goffset *selected_words; rspamd_stat_token_t *tok; guint i; - guint64 seed; + uint64_t seed; /* Seed PRNG with part digest to provide some sort of determinism */ memcpy(&seed, part->mime_part->digest, sizeof(seed)); @@ -1411,14 +1411,14 @@ rspamd_language_detector_unicode_scripts(struct rspamd_task *task, const gchar *p = part->utf_stripped_content->data, *end; guint i = 0, cnt = 0; end = p + part->utf_stripped_content->len; - gint32 uc, sc; + int32_t uc, sc; guint nlatin = 0, nchinese = 0, nspecial = 0; const guint cutoff_limit = 32; while (p + i < end) { U8_NEXT(p, i, part->utf_stripped_content->len, uc); - if (((gint32) uc) < 0) { + if (((int32_t) uc) < 0) { break; } |