Changeset 6f14b20 for util.c


Ignore:
Timestamp:
Jan 5, 2013, 3:58:37 PM (11 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
f9325e9
Parents:
048b1ff
git-author:
Jason Gross <jgross@mit.edu> (01/05/13 15:57:27)
git-committer:
Jason Gross <jgross@mit.edu> (01/05/13 15:58:37)
Message:
Replace comment about glib 2.22 with version check
File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    r7b89e8c r6f14b20  
    9595}
    9696
    97 void owl_ptr_array_free(GPtrArray *array, GDestroyNotify element_free_func)
    98 {
    99   /* TODO: when we move to requiring glib 2.22+, use
    100    * g_ptr_array_new_with_free_func instead. */
    101   if (element_free_func)
     97void owl_ptr_array_free(GPtrArray *array, GDestroyNotify element_free_func) {
     98  if (element_free_func) {
     99#if GLIB_CHECK_VERSION(2, 22, 0)
     100    g_ptr_array_set_free_func(array, element_free_func);
     101#else
    102102    g_ptr_array_foreach(array, (GFunc)element_free_func, NULL);
     103#endif
     104  }
    103105  g_ptr_array_free(array, true);
    104106}
     
    116118
    117119  argv = g_ptr_array_new();
    118   len=strlen(line);
     120  len = strlen(line);
    119121  curarg = g_string_new("");
    120122  quote='\0';
Note: See TracChangeset for help on using the changeset viewer.