In libobjc/:
authorNicola Pero <nicola.pero@meta-innovation.com>
Fri, 17 Sep 2010 16:52:36 +0000 (16:52 +0000)
committerNicola Pero <nicola@gcc.gnu.org>
Fri, 17 Sep 2010 16:52:36 +0000 (16:52 +0000)
        * 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.

From-SVN: r164374

libobjc/ChangeLog
libobjc/Makefile.in
libobjc/objc-private/objc-list.h
libobjc/objc/hash.h [new file with mode: 0644]
libobjc/objc/objc-list.h [new file with mode: 0644]

index ae242d20e592113027904bfd0239edef53948e31..71af2b760b3fb98fb9e7b275d775289d8b59c174 100644 (file)
@@ -1,3 +1,9 @@
+2010-09-17  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * 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  <nicola.pero@meta-innovation.com>
 
        * 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  <nicola.pero@meta-innovation.com>
 
index 576b29e6a0722410a506391d3a4760080a229a4e..2fac2a574a47bd589380fe8fe1412fbc2e0a8fff 100644 (file)
@@ -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
index e542bfc0498fe0a25ac9fbb5c5feb8bfbf01d2a9..b78f4c1347f18cf7a237ba6074d5dab78c0558c5 100644 (file)
@@ -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 (file)
index 0000000..8225a09
--- /dev/null
@@ -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 (file)
index 0000000..b713a3c
--- /dev/null
@@ -0,0 +1,2 @@
+#include "deprecated/objc-list.h"
+