diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index ae242d20e59..71af2b760b3 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,9 @@ +2010-09-17 Nicola Pero + + * 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. + 2010-09-17 Nicola Pero * objc/hash.h: Moved into objc/deprecated/hash.h; objc/hash.h @@ -20,7 +26,6 @@ * sarray.c: Same change. * sendmsg.c: Same change. * Makefile.in (OBJC_DEPRECATED_H): Added hash.h and objc-list.h. - (OBJC_H): Removed hash.h and objc-list.h 2010-09-14 Nicola Pero diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in index 576b29e6a07..2fac2a574a4 100644 --- a/libobjc/Makefile.in +++ b/libobjc/Makefile.in @@ -123,6 +123,8 @@ OBJC_H = \ sarray.h \ thr.h \ \ + hash.h \ + objc-list.h \ typedstream.h # User-visible header files containing deprecated APIs, from the 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 diff --git a/libobjc/objc/hash.h b/libobjc/objc/hash.h new file mode 100644 index 00000000000..8225a0992e4 --- /dev/null +++ b/libobjc/objc/hash.h @@ -0,0 +1,3 @@ +#include "objc.h" +#include "deprecated/hash.h" + diff --git a/libobjc/objc/objc-list.h b/libobjc/objc/objc-list.h new file mode 100644 index 00000000000..b713a3c0ec9 --- /dev/null +++ b/libobjc/objc/objc-list.h @@ -0,0 +1,2 @@ +#include "deprecated/objc-list.h" +