diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-17 16:52:36 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-17 16:52:36 +0000 |
commit | 41c3fcada49bf862ee3b7daacbe27d554cf152a8 (patch) | |
tree | d8190cf44cf276b7ecc1aa394d368822ce531215 /libobjc/objc-private | |
parent | 1a46e3f104bdc3c8fb448e7ed91339918a7c1a20 (diff) | |
download | gcc-41c3fcada49bf862ee3b7daacbe27d554cf152a8.tar.gz |
In libobjc/:
* objc-private/objc-list.h (list_remove_elem): Unused function
removed. (list_nth): Unused function removed. (list_find):
Unused function removed. (list_lenght): Unused function removed.
Also, fixed an error in my last commit by adding back
objc/hash.h and objc/objc-list.h that had not been committed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164374 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/objc-private')
-rw-r--r-- | libobjc/objc-private/objc-list.h | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/libobjc/objc-private/objc-list.h b/libobjc/objc-private/objc-list.h index e542bfc0498..b78f4c1347f 100644 --- a/libobjc/objc-private/objc-list.h +++ b/libobjc/objc-private/objc-list.h @@ -49,36 +49,6 @@ list_cons(void* head, struct objc_list* tail) return cell; } -/* Return the length of a list, list_length(NULL) returns zero */ - -static inline int -list_length(struct objc_list* list) -{ - int i = 0; - while(list) - { - i += 1; - list = list->tail; - } - return i; -} - -/* Return the Nth element of LIST, where N count from zero. If N - larger than the list length, NULL is returned */ - -static inline void* -list_nth(int indx, struct objc_list* list) -{ - while(indx-- != 0) - { - if(list->tail) - list = list->tail; - else - return 0; - } - return list->head; -} - /* Remove the element at the head by replacing it by its successor */ static inline void @@ -98,18 +68,6 @@ list_remove_head(struct objc_list** list) } -/* Remove the element with `car' set to ELEMENT */ - -static inline void -list_remove_elem(struct objc_list** list, void* elem) -{ - while (*list) { - if ((*list)->head == elem) - list_remove_head(list); - list = &((*list)->tail); - } -} - /* Map FUNCTION over all elements in LIST */ static inline void @@ -122,20 +80,6 @@ list_mapcar(struct objc_list* list, void(*function)(void*)) } } -/* Return element that has ELEM as car */ - -static inline struct objc_list** -list_find(struct objc_list** list, void* elem) -{ - while(*list) - { - if ((*list)->head == elem) - return list; - list = &((*list)->tail); - } - return NULL; -} - /* Free list (backwards recursive) */ static inline void |