/* Block tag */
nnode = g_node_new (tag);
- if (tag->params) {
- rspamd_mempool_add_destructor (pool,
- (rspamd_mempool_destruct_t) g_list_free,
- tag->params);
- }
-
if (tag->flags & FL_CLOSING) {
if (!*cur_level) {
msg_debug_pool ("bad parent node");
comp->type = (comp_type); \
comp->start = NULL; \
comp->len = 0; \
- tag->params = g_list_append (tag->params, comp); \
+ g_queue_push_tail (tag->params, comp); \
ret = TRUE; \
} while(0)
if (store) {
if (*savep != NULL) {
g_assert (tag->params != NULL);
- comp = (g_list_first (tag->params))->data;
+ comp = g_queue_peek_tail (tag->params);
+ g_assert (comp != NULL);
comp->len = in - *savep;
comp->start = *savep;
*savep = NULL;
if (store) {
if (*savep != NULL) {
g_assert (tag->params != NULL);
- comp = (g_list_first (tag->params))->data;
+ comp = g_queue_peek_tail (tag->params);
+ g_assert (comp != NULL);
comp->len = in - *savep;
comp->start = *savep;
*savep = NULL;
if (store) {
if (*savep != NULL) {
g_assert (tag->params != NULL);
- comp = (g_list_first (tag->params))->data;
+ comp = g_queue_peek_tail (tag->params);
+ g_assert (comp != NULL);
comp->len = in - *savep;
comp->start = *savep;
*savep = NULL;
GList *cur;
gint rc;
- cur = tag->params;
+ cur = tag->params->head;
while (cur) {
comp = cur->data;
GList *cur;
gulong val;
- cur = tag->params;
+ cur = tag->params->head;
img = rspamd_mempool_alloc0 (pool, sizeof (*img));
while (cur) {
rspamd_ftok_t fstr;
GList *cur;
- cur = tag->params;
+ cur = tag->params->head;
bl = rspamd_mempool_alloc0 (pool, sizeof (*bl));
bl->tag = tag;
substate = 0;
savep = NULL;
cur_tag = rspamd_mempool_alloc0 (pool, sizeof (*cur_tag));
+ cur_tag->params = g_queue_new ();
+ rspamd_mempool_add_destructor (pool,
+ (rspamd_mempool_destruct_t)g_queue_free, cur_tag->params);
break;
}