Add comments informing the caller about side effects
[pspp-builds.git] / src / math / sort.c
index 8719d877e096fcc9fc0d0f911d462d7bd0566725..5b82277cb7b255f25c1663b6bbc1167f8bae72f9 100644 (file)
@@ -169,7 +169,9 @@ static struct casewriter_class sort_casewriter_class =
   };
 \f
 /* Reads all the cases from INPUT.  Sorts the cases according to
-   ORDERING.  Returns the sorted cases in a new casereader. */
+   ORDERING.  Returns the sorted cases in a new casereader.
+   INPUT is destroyed by this function.
+ */
 struct casereader *
 sort_execute (struct casereader *input, const struct subcase *ordering)
 {
@@ -181,7 +183,7 @@ sort_execute (struct casereader *input, const struct subcase *ordering)
 
 /* Reads all the cases from INPUT.  Sorts the cases in ascending
    order according to VARIABLE.  Returns the sorted cases in a
-   new casereader. */
+   new casereader.  INPUT is destroyed by this function. */
 struct casereader *
 sort_execute_1var (struct casereader *input, const struct variable *var)
 {