Kaynağa Gözat

clarify what smartlist_remove promises, since we rely on it.

svn:r3473
Roger Dingledine 20 yıl önce
ebeveyn
işleme
c53c7a0b4c
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      src/common/container.c

+ 3 - 2
src/common/container.c

@@ -100,8 +100,9 @@ void smartlist_add_all(smartlist_t *sl, const smartlist_t *s2)
   SMARTLIST_FOREACH(s2, void *, element, smartlist_add(sl, element));
   SMARTLIST_FOREACH(s2, void *, element, smartlist_add(sl, element));
 }
 }
 
 
-/** Remove all elements E from sl such that E==element.  Does not preserve
+/** Remove all elements E from sl such that E==element.  Preserve
- * the order of s1.
+ * the order of any elements before E, but elements after E can be
+ * rearranged.
  */
  */
 void smartlist_remove(smartlist_t *sl, void *element) {
 void smartlist_remove(smartlist_t *sl, void *element) {
   int i;
   int i;