Commit 3fef0494 authored by Philip Withnall's avatar Philip Withnall

gchecksum: Add missing (transfer) and (nullable) return annotations

This commit only looks at the `Returns:` lines in the documentation, and
has examined all of them in the file. Function arguments have not been
checked.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <pwithnall@endlessos.org>

Helps: #2227
parent da83d711
......@@ -1461,7 +1461,7 @@ g_checksum_type_get_length (GChecksumType checksum_type)
* will be closed and it won't be possible to call g_checksum_update()
* on it anymore.
*
* Returns: (transfer full): the newly created #GChecksum, or %NULL.
* Returns: (transfer full) (nullable): the newly created #GChecksum, or %NULL.
* Use g_checksum_free() to free the memory allocated by it.
*
* Since: 2.16
......@@ -1529,8 +1529,8 @@ g_checksum_reset (GChecksum *checksum)
* g_checksum_get_string() or g_checksum_get_digest(), the copied
* checksum will be closed as well.
*
* Returns: the copy of the passed #GChecksum. Use g_checksum_free()
* when finished using it.
* Returns: (transfer full): the copy of the passed #GChecksum. Use
* g_checksum_free() when finished using it.
*
* Since: 2.16
*/
......@@ -1775,8 +1775,10 @@ g_checksum_get_digest (GChecksum *checksum,
*
* The hexadecimal string returned will be in lower case.
*
* Returns: the digest of the binary data as a string in hexadecimal.
* The returned string should be freed with g_free() when done using it.
* Returns: (transfer full) (nullable): the digest of the binary data as a
* string in hexadecimal, or %NULL if g_checksum_new() fails for
* @checksum_type. The returned string should be freed with g_free() when
* done using it.
*
* Since: 2.16
*/
......@@ -1812,7 +1814,8 @@ g_compute_checksum_for_data (GChecksumType checksum_type,
*
* The hexadecimal string returned will be in lower case.
*
* Returns: the checksum as a hexadecimal string. The returned string
* Returns: (transfer full) (nullable): the checksum as a hexadecimal string,
* or %NULL if g_checksum_new() fails for @checksum_type. The returned string
* should be freed with g_free() when done using it.
*
* Since: 2.16
......@@ -1842,8 +1845,10 @@ g_compute_checksum_for_string (GChecksumType checksum_type,
*
* The hexadecimal string returned will be in lower case.
*
* Returns: the digest of the binary data as a string in hexadecimal.
* The returned string should be freed with g_free() when done using it.
* Returns: (transfer full) (nullable): the digest of the binary data as a
* string in hexadecimal, or %NULL if g_checksum_new() fails for
* @checksum_type. The returned string should be freed with g_free() when
* done using it.
*
* Since: 2.34
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment