Changeset 3cdd6d2 for functions.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:
ce68f23
Parents:
e4524da
git-author:
David Benjamin <davidben@mit.edu> (06/11/11 19:49:43)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
Message:
Add owl_ptr_array_free convenience function

Unfortunately, most uses of GPtrArray here require a two-step chant
which is really annoying. Until we require glib 2.22 and get
g_ptr_array_new_with_free_func, use this helper function.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    re4524da r3cdd6d2  
    27792779
    27802780  owl_function_punt(argv->len, (const char *const*) argv->pdata, direction);
    2781   g_ptr_array_foreach(argv, (GFunc)g_free, NULL);
    2782   g_ptr_array_free(argv, true);
     2781  owl_ptr_array_free(argv, g_free);
    27832782}
    27842783
     
    30733072        }
    30743073      }
    3075       g_ptr_array_foreach(anyone, (GFunc)g_free, NULL);
    3076       g_ptr_array_free(anyone, true);
     3074      owl_ptr_array_free(anyone, g_free);
    30773075    }
    30783076  }
     
    34183416  }
    34193417
    3420   g_ptr_array_foreach(anyone, (GFunc)g_free, NULL);
    3421   g_ptr_array_free(anyone, true);
     3418  owl_ptr_array_free(anyone, g_free);
    34223419#endif
    34233420}
Note: See TracChangeset for help on using the changeset viewer.