Changeset eb897c6


Ignore:
Timestamp:
Jun 25, 2011, 3:26:15 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
e6d7e4e
Parents:
7ed9bc6
git-author:
David Benjamin <davidben@mit.edu> (03/11/11 11:16:32)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
Message:
Replace owl_errqueue's owl_list with a GPtrArray
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • errqueue.c

    rd4927a7 reb897c6  
    33void owl_errqueue_init(owl_errqueue *eq)
    44{
    5   owl_list_create(&(eq->errlist));
     5  eq->errlist = g_ptr_array_new();
    66}
    77
    88void owl_errqueue_append_err(owl_errqueue *eq, const char *msg)
    99{
    10   owl_list_append_element(&(eq->errlist), g_strdup(msg));
     10  g_ptr_array_add(eq->errlist, g_strdup(msg));
    1111}
    1212
     
    1414void owl_errqueue_to_fmtext(const owl_errqueue *eq, owl_fmtext *fm)
    1515{
    16   int i, j;
    17 
    18   j=owl_list_get_size(&(eq->errlist));
    19   for (i=0; i<j; i++) {
    20     owl_fmtext_append_normal(fm, owl_list_get_element(&(eq->errlist), i));
     16  int i;
     17  for (i = 0; i < eq->errlist->len; i++) {
     18    owl_fmtext_append_normal(fm, eq->errlist->pdata[i]);
    2119    owl_fmtext_append_normal(fm, "\n");
    2220  }
  • owl.h

    r7ed9bc6 reb897c6  
    516516
    517517typedef struct _owl_errqueue {
    518   owl_list errlist;
     518  GPtrArray *errlist;
    519519} owl_errqueue;
    520520
Note: See TracChangeset for help on using the changeset viewer.