diff options
| author | 2018-12-10 02:20:24 +0100 | |
|---|---|---|
| committer | 2018-12-10 02:22:15 +0100 | |
| commit | 4de329327ce4aa175e8496d1bff8604bffb6c574 (patch) | |
| tree | 0c5fce7e138756a2479acab5a3098fa12ea6971b /libcnary/include/iterator.h | |
| parent | 71dd25e14616bd261c3b6c80ff990cd1078266f6 (diff) | |
| download | libplist-4de329327ce4aa175e8496d1bff8604bffb6c574.tar.gz libplist-4de329327ce4aa175e8496d1bff8604bffb6c574.tar.bz2 | |
Remove node_iterator and operate on node list directly to improve memory usage
Diffstat (limited to 'libcnary/include/iterator.h')
| -rw-r--r-- | libcnary/include/iterator.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/libcnary/include/iterator.h b/libcnary/include/iterator.h deleted file mode 100644 index a33c4ff..0000000 --- a/libcnary/include/iterator.h +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * iterator.h | ||
| 3 | * | ||
| 4 | * Created on: Mar 8, 2011 | ||
| 5 | * Author: posixninja | ||
| 6 | * | ||
| 7 | * Copyright (c) 2011 Joshua Hill. All Rights Reserved. | ||
| 8 | * | ||
| 9 | * This library is free software; you can redistribute it and/or | ||
| 10 | * modify it under the terms of the GNU Lesser General Public | ||
| 11 | * License as published by the Free Software Foundation; either | ||
| 12 | * version 2.1 of the License, or (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This library is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 17 | * Lesser General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU Lesser General Public | ||
| 20 | * License along with this library; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef ITERATOR_H_ | ||
| 25 | #define ITERATOR_H_ | ||
| 26 | |||
| 27 | struct list_t; | ||
| 28 | struct object_t; | ||
| 29 | |||
| 30 | typedef struct iterator_t { | ||
| 31 | struct object_t*(*next)(struct iterator_t* iterator); | ||
| 32 | int(*bind)(struct iterator_t* iterator, struct list_t* list); | ||
| 33 | |||
| 34 | unsigned int count; | ||
| 35 | unsigned int position; | ||
| 36 | |||
| 37 | struct list_t* list; | ||
| 38 | struct object_t* end; | ||
| 39 | struct object_t* begin; | ||
| 40 | struct object_t* value; | ||
| 41 | } iterator_t; | ||
| 42 | |||
| 43 | void iterator_destroy(struct iterator_t* iterator); | ||
| 44 | struct iterator_t* iterator_create(struct list_t* list); | ||
| 45 | |||
| 46 | struct object_t* iterator_next(struct iterator_t* iterator); | ||
| 47 | int iterator_bind(struct iterator_t* iterator, struct list_t* list); | ||
| 48 | |||
| 49 | #endif /* ITERATOR_H_ */ | ||
