Changeset e6d7e4e for global.c


Ignore:
Timestamp:
Jun 25, 2011, 3:26:15 AM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
ecffae6
Parents:
eb897c6
git-author:
David Benjamin <davidben@mit.edu> (03/11/11 11:39:41)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
Message:
Replace the puntlist with an GPtrArray
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r6829afc re6d7e4e  
    4747  owl_dict_create(&(g->filters));
    4848  g->filterlist = NULL;
    49   owl_list_create(&(g->puntlist));
     49  g->puntlist = g_ptr_array_new();
    5050  g->messagequeue = g_queue_new();
    5151  owl_dict_create(&(g->styledict));
     
    579579/* puntlist */
    580580
    581 owl_list *owl_global_get_puntlist(owl_global *g) {
    582   return(&(g->puntlist));
     581GPtrArray *owl_global_get_puntlist(owl_global *g) {
     582  return g->puntlist;
    583583}
    584584
    585585int owl_global_message_is_puntable(owl_global *g, const owl_message *m) {
    586   const owl_list *pl;
    587   int i, j;
    588 
    589   pl=owl_global_get_puntlist(g);
    590   j=owl_list_get_size(pl);
    591   for (i=0; i<j; i++) {
    592     if (owl_filter_message_match(owl_list_get_element(pl, i), m)) return(1);
    593   }
    594   return(0);
     586  const GPtrArray *pl;
     587  int i;
     588
     589  pl = owl_global_get_puntlist(g);
     590  for (i = 0; i < pl->len; i++) {
     591    if (owl_filter_message_match(pl->pdata[i], m)) return 1;
     592  }
     593  return 0;
    595594}
    596595
Note: See TracChangeset for help on using the changeset viewer.