Deleted Added
full compact
array.c (226031) array.c (226128)
1/*
2 * Copyright (c) 2010 Kungliga Tekniska H��gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Portions Copyright (c) 2010 Apple Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 204 unchanged lines hidden (view full) ---

213/**
214 * Get value at idx
215 *
216 * @param array the array to modify
217 * @param idx the key to delete
218 */
219
220void
1/*
2 * Copyright (c) 2010 Kungliga Tekniska H��gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Portions Copyright (c) 2010 Apple Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 204 unchanged lines hidden (view full) ---

213/**
214 * Get value at idx
215 *
216 * @param array the array to modify
217 * @param idx the key to delete
218 */
219
220void
221heim_array_filter(heim_array_t array, bool (^block)(heim_object_t))
221heim_array_filter(heim_array_t array, int (^block)(heim_object_t))
222{
223 size_t n = 0;
224
225 while (n < array->len) {
226 if (block(array->val[n])) {
227 heim_array_delete_value(array, n);
228 } else {
229 n++;
230 }
231 }
232}
233
234#endif /* __BLOCKS__ */
222{
223 size_t n = 0;
224
225 while (n < array->len) {
226 if (block(array->val[n])) {
227 heim_array_delete_value(array, n);
228 } else {
229 n++;
230 }
231 }
232}
233
234#endif /* __BLOCKS__ */