- Timestamp:
- Jun 25, 2011, 3:26:15 AM (13 years ago)
- Branches:
- master, release-1.10, 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
util.c
r6829afc r3cdd6d2 98 98 } 99 99 100 void owl_ptr_array_free(GPtrArray *array, GDestroyNotify element_free_func) 101 { 102 /* TODO: when we move to requiring glib 2.22+, use 103 * g_ptr_array_new_with_free_func instead. */ 104 if (element_free_func) 105 g_ptr_array_foreach(array, (GFunc)element_free_func, NULL); 106 g_ptr_array_free(array, true); 107 } 108 100 109 /* Break a command line up into argv, argc. The caller must free 101 110 the returned values with g_strfreev. If there is an error argc will be set … … 170 179 /* check for unbalanced quotes */ 171 180 if (quote!='\0') { 172 /* TODO: when we move to requiring glib 2.22+, use 173 * g_ptr_array_new_with_free_func. */ 174 g_ptr_array_foreach(argv, (GFunc)g_free, NULL); 175 g_ptr_array_free(argv, true); 181 owl_ptr_array_free(argv, g_free); 176 182 if (argc) *argc = -1; 177 183 return(NULL);
Note: See TracChangeset
for help on using the changeset viewer.