瀏覽代碼

clarify what smartlist_remove promises, since we rely on it.

svn:r3473
Roger Dingledine 20 年之前
父節點
當前提交
c53c7a0b4c
共有 1 個文件被更改,包括 3 次插入2 次删除
  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));
 }
 
-/** Remove all elements E from sl such that E==element.  Does not preserve
- * the order of s1.
+/** Remove all elements E from sl such that E==element.  Preserve
+ * the order of any elements before E, but elements after E can be
+ * rearranged.
  */
 void smartlist_remove(smartlist_t *sl, void *element) {
   int i;