From 52a146604b64229330802c222621331d5eb8ff7a Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Sun, 3 May 2020 18:11:29 +0200 Subject: [PATCH] gir: Add some missing (array length) annotations This will make sure that bindings can generate a more "native" API so they don't have to pass the length explicitly. --- libgimpbase/gimpmetadata.c | 8 ++++---- libgimpbase/gimputils.c | 2 +- libgimpcolor/gimprgb-parse.c | 12 ++++++------ libgimpconfig/gimpscanner.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c index d2f376ac97..06089527ab 100644 --- a/libgimpbase/gimpmetadata.c +++ b/libgimpbase/gimpmetadata.c @@ -979,7 +979,7 @@ gimp_metadata_save_to_file (GimpMetadata *metadata, /** * gimp_metadata_set_from_exif: * @metadata: A #GimpMetadata instance. - * @exif_data: The blob of Exif data to set + * @exif_data: (array length=exif_data_length): The blob of Exif data to set * @exif_data_length: Length of @exif_data, in bytes * @error: Return location for error message * @@ -1053,7 +1053,7 @@ gimp_metadata_set_from_exif (GimpMetadata *metadata, /** * gimp_metadata_set_from_iptc: * @metadata: A #GimpMetadata instance. - * @iptc_data: The blob of Ipc data to set + * @iptc_data: (array length=iptc_data_length): The blob of Iptc data to set * @iptc_data_length:Length of @iptc_data, in bytes * @error: Return location for error message * @@ -1101,8 +1101,8 @@ gimp_metadata_set_from_iptc (GimpMetadata *metadata, /** * gimp_metadata_set_from_xmp: * @metadata: A #GimpMetadata instance. - * @xmp_data: The blob of Exif data to set - * @xmp_data_length: Length of @exif_data, in bytes + * @xmp_data: (array length=xmp_data_length): The blob of XMP data to set + * @xmp_data_length: Length of @xmp_data, in bytes * @error: Return location for error message * * Sets the tags from a piece of XMP data on @metadata. diff --git a/libgimpbase/gimputils.c b/libgimpbase/gimputils.c index 52da9e63b6..dd46e18610 100644 --- a/libgimpbase/gimputils.c +++ b/libgimpbase/gimputils.c @@ -152,7 +152,7 @@ gimp_utf8_strtrim (const gchar *str, /** * gimp_any_to_utf8: - * @str: The string to be converted to UTF-8. + * @str: (array length=len): The string to be converted to UTF-8. * @len: The length of the string, or -1 if the string * is nul-terminated. * @warning_format: The message format for the warning message if conversion diff --git a/libgimpcolor/gimprgb-parse.c b/libgimpcolor/gimprgb-parse.c index 38807daab7..8e50b99ce6 100644 --- a/libgimpcolor/gimprgb-parse.c +++ b/libgimpcolor/gimprgb-parse.c @@ -213,7 +213,7 @@ static const ColorEntry named_colors[] = /** * gimp_rgb_parse_name: * @rgb: a #GimpRGB struct used to return the parsed color - * @name: a color name (in UTF-8 encoding) + * @name: (array length=len): a color name (in UTF-8 encoding) * @len: the length of @name, in bytes. or -1 if @name is nul-terminated * * Attempts to parse a color name. This function accepts rgba(255,0,0,255) diff --git a/libgimpconfig/gimpscanner.c b/libgimpconfig/gimpscanner.c index 888dd5b55a..3a620b2bec 100644 --- a/libgimpconfig/gimpscanner.c +++ b/libgimpconfig/gimpscanner.c @@ -228,9 +228,9 @@ gimp_scanner_new_stream (GInputStream *input, /** * gimp_scanner_new_string: - * @text: - * @text_len: - * @error: + * @text: (array length=text_len): + * @text_len: The length of @text, or -1 if NULL-terminated + * @error: return location for #GError, or %NULL * * Returns: (transfer full): The new #GimpScanner. *