Merge branch 'mm/credential-libsecret'
[gitweb.git] / Documentation / technical / api-sha1-array.txt
index 3e75497a37d696d534c16ff0270a808b57ac9180..dcc52943a5da7dbbfe8d42cdcc7d593ec1ba1416 100644 (file)
@@ -38,16 +38,20 @@ Functions
 `sha1_array_for_each_unique`::
        Efficiently iterate over each unique element of the list,
        executing the callback function for each one. If the array is
-       not sorted, this function has the side effect of sorting it.
+       not sorted, this function has the side effect of sorting it. If
+       the callback returns a non-zero value, the iteration ends
+       immediately and the callback's return is propagated; otherwise,
+       0 is returned.
 
 Examples
 --------
 
 -----------------------------------------
-void print_callback(const unsigned char sha1[20],
+int print_callback(const unsigned char sha1[20],
                    void *data)
 {
        printf("%s\n", sha1_to_hex(sha1));
+       return 0; /* always continue */
 }
 
 void some_func(void)