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 <pwithnall@endlessos.org>

Helps: #2227
This commit is contained in:
Philip Withnall 2020-12-11 23:20:56 +00:00
parent da83d711d6
commit 3fef049472

View File

@ -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() * will be closed and it won't be possible to call g_checksum_update()
* on it anymore. * 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. * Use g_checksum_free() to free the memory allocated by it.
* *
* Since: 2.16 * Since: 2.16
@ -1529,8 +1529,8 @@ g_checksum_reset (GChecksum *checksum)
* g_checksum_get_string() or g_checksum_get_digest(), the copied * g_checksum_get_string() or g_checksum_get_digest(), the copied
* checksum will be closed as well. * checksum will be closed as well.
* *
* Returns: the copy of the passed #GChecksum. Use g_checksum_free() * Returns: (transfer full): the copy of the passed #GChecksum. Use
* when finished using it. * g_checksum_free() when finished using it.
* *
* Since: 2.16 * Since: 2.16
*/ */
@ -1775,8 +1775,10 @@ g_checksum_get_digest (GChecksum *checksum,
* *
* The hexadecimal string returned will be in lower case. * The hexadecimal string returned will be in lower case.
* *
* Returns: the digest of the binary data as a string in hexadecimal. * Returns: (transfer full) (nullable): the digest of the binary data as a
* The returned string should be freed with g_free() when done using it. * 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 * Since: 2.16
*/ */
@ -1812,7 +1814,8 @@ g_compute_checksum_for_data (GChecksumType checksum_type,
* *
* The hexadecimal string returned will be in lower case. * 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. * should be freed with g_free() when done using it.
* *
* Since: 2.16 * Since: 2.16
@ -1842,8 +1845,10 @@ g_compute_checksum_for_string (GChecksumType checksum_type,
* *
* The hexadecimal string returned will be in lower case. * The hexadecimal string returned will be in lower case.
* *
* Returns: the digest of the binary data as a string in hexadecimal. * Returns: (transfer full) (nullable): the digest of the binary data as a
* The returned string should be freed with g_free() when done using it. * 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 * Since: 2.34
*/ */