aboutsummaryrefslogtreecommitdiffstats
path: root/src/tokenizers/osb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tokenizers/osb.c')
-rw-r--r--src/tokenizers/osb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tokenizers/osb.c b/src/tokenizers/osb.c
index c59536b31..823e1e5b5 100644
--- a/src/tokenizers/osb.c
+++ b/src/tokenizers/osb.c
@@ -35,7 +35,7 @@
extern const int primes[];
int
-osb_tokenize_text (struct tokenizer *tokenizer, memory_pool_t * pool, f_str_t * input, GTree ** tree,
+osb_tokenize_text (struct tokenizer *tokenizer, rspamd_mempool_t * pool, f_str_t * input, GTree ** tree,
gboolean save_token, gboolean is_utf, GList *exceptions)
{
token_node_t *new = NULL;
@@ -46,7 +46,7 @@ osb_tokenize_text (struct tokenizer *tokenizer, memory_pool_t * pool, f_str_t *
if (*tree == NULL) {
*tree = g_tree_new (token_node_compare_func);
- memory_pool_add_destructor (pool, (pool_destruct_func) g_tree_destroy, *tree);
+ rspamd_mempool_add_destructor (pool, (rspamd_mempool_destruct_t) g_tree_destroy, *tree);
}
memset (hashpipe, 0xfe, FEATURE_WINDOW_SIZE * sizeof (hashpipe[0]));
@@ -80,11 +80,11 @@ osb_tokenize_text (struct tokenizer *tokenizer, memory_pool_t * pool, f_str_t *
for (i = 1; i < FEATURE_WINDOW_SIZE; i++) {
h1 = hashpipe[0] * primes[0] + hashpipe[i] * primes[i << 1];
h2 = hashpipe[0] * primes[1] + hashpipe[i] * primes[(i << 1) - 1];
- new = memory_pool_alloc0 (pool, sizeof (token_node_t));
+ new = rspamd_mempool_alloc0 (pool, sizeof (token_node_t));
new->h1 = h1;
new->h2 = h2;
if (save_token) {
- new->extra = (uintptr_t)memory_pool_fstrdup (pool, &token);
+ new->extra = (uintptr_t)rspamd_mempool_fstrdup (pool, &token);
}
if (g_tree_lookup (*tree, new) == NULL) {
@@ -99,11 +99,11 @@ osb_tokenize_text (struct tokenizer *tokenizer, memory_pool_t * pool, f_str_t *
for (i = 1; i < processed; i++) {
h1 = hashpipe[0] * primes[0] + hashpipe[i] * primes[i << 1];
h2 = hashpipe[0] * primes[1] + hashpipe[i] * primes[(i << 1) - 1];
- new = memory_pool_alloc0 (pool, sizeof (token_node_t));
+ new = rspamd_mempool_alloc0 (pool, sizeof (token_node_t));
new->h1 = h1;
new->h2 = h2;
if (save_token) {
- new->extra = (uintptr_t)memory_pool_fstrdup (pool, &token);
+ new->extra = (uintptr_t)rspamd_mempool_fstrdup (pool, &token);
}
if (g_tree_lookup (*tree, new) == NULL) {