summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2021-03-20 11:14:15 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2021-03-20 11:14:15 -0700
commit748103d75a665368be5fb978218d480a7c4e3a81 (patch)
tree1c106d1e321dda88c5c79ba2eb376a5e3fab6b2b
parent33734480d31aa11d2f1101c98ec9ee0d4e3e307e (diff)
downloadglib-748103d75a665368be5fb978218d480a7c4e3a81.tar.gz
introspection: Remove 'caller-allocates' from POD types
The (out caller-allocates) and (out callee-allocates) annotations are meant for structured or pointer types. Plain old data types are just regular out parameters and don't need the annotation about who allocates them. See: https://gitlab.gnome.org/GNOME/gjs/-/issues/386
-rw-r--r--glib/garray.c12
-rw-r--r--glib/gutf8.c26
2 files changed, 19 insertions, 19 deletions
diff --git a/glib/garray.c b/glib/garray.c
index 2b66f16a6..609a21038 100644
--- a/glib/garray.c
+++ b/glib/garray.c
@@ -188,7 +188,7 @@ g_array_new (gboolean zero_terminated,
/**
* g_array_steal:
* @array: a #GArray.
- * @len: (optional) (out caller-allocates): pointer to retrieve the number of
+ * @len: (optional) (out): pointer to retrieve the number of
* elements of the original array
*
* Frees the data in the array and resets the size to zero, while
@@ -867,7 +867,7 @@ g_array_sort_with_data (GArray *farray,
* @array: a #GArray.
* @target: a pointer to the item to look up.
* @compare_func: A #GCompareFunc used to locate @target.
- * @out_match_index: (optional) (out caller-allocates): return location
+ * @out_match_index: (optional) (out): return location
* for the index of the element, if found.
*
* Checks whether @target exists in @array by performing a binary
@@ -1114,7 +1114,7 @@ g_ptr_array_new (void)
/**
* g_ptr_array_steal:
* @array: a #GPtrArray.
- * @len: (optional) (out caller-allocates): pointer to retrieve the number of
+ * @len: (optional) (out): pointer to retrieve the number of
* elements of the original array
*
* Frees the data in the array and resets the size to zero, while
@@ -2099,7 +2099,7 @@ g_ptr_array_foreach (GPtrArray *array,
* g_ptr_array_find: (skip)
* @haystack: pointer array to be searched
* @needle: pointer to look for
- * @index_: (optional) (out caller-allocates): return location for the index of
+ * @index_: (optional) (out): return location for the index of
* the element, if found
*
* Checks whether @needle exists in @haystack. If the element is found, %TRUE is
@@ -2128,7 +2128,7 @@ g_ptr_array_find (GPtrArray *haystack,
* @equal_func: (nullable): the function to call for each element, which should
* return %TRUE when the desired element is found; or %NULL to use pointer
* equality
- * @index_: (optional) (out caller-allocates): return location for the index of
+ * @index_: (optional) (out): return location for the index of
* the element, if found
*
* Checks whether @needle exists in @haystack, using the given @equal_func.
@@ -2234,7 +2234,7 @@ g_byte_array_new (void)
/**
* g_byte_array_steal:
* @array: a #GByteArray.
- * @len: (optional) (out caller-allocates): pointer to retrieve the number of
+ * @len: (optional) (out): pointer to retrieve the number of
* elements of the original array
*
* Frees the data in the array and resets the size to zero, while
diff --git a/glib/gutf8.c b/glib/gutf8.c
index 51ad0d09b..ca1a395c1 100644
--- a/glib/gutf8.c
+++ b/glib/gutf8.c
@@ -706,7 +706,7 @@ g_utf8_get_char_validated (const gchar *p,
* @str: a UTF-8 encoded string
* @len: the maximum length of @str to use, in bytes. If @len < 0,
* then the string is nul-terminated.
- * @items_written: (out caller-allocates) (optional): location to store the
+ * @items_written: (out) (optional): location to store the
* number of characters in the result, or %NULL.
*
* Convert a string from UTF-8 to a 32-bit fixed width
@@ -823,13 +823,13 @@ try_malloc_n (gsize n_blocks, gsize n_block_bytes, GError **error)
* @str: a UTF-8 encoded string
* @len: the maximum length of @str to use, in bytes. If @len < 0,
* then the string is nul-terminated.
- * @items_read: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): location to store number of
* bytes read, or %NULL.
* If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be
* returned in case @str contains a trailing partial
* character. If an error occurs then the index of the
* invalid input is stored here.
- * @items_written: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): location to store number
* of characters written or %NULL. The value here stored does not include
* the trailing 0 character.
* @error: location to store the error occurring, or %NULL to ignore
@@ -909,9 +909,9 @@ g_utf8_to_ucs4 (const gchar *str,
* @str: a UCS-4 encoded string
* @len: the maximum length (number of characters) of @str to use.
* If @len < 0, then the string is nul-terminated.
- * @items_read: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): location to store number of
* characters read, or %NULL.
- * @items_written: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): location to store number
* of bytes written or %NULL. The value here stored does not include the
* trailing 0 byte.
* @error: location to store the error occurring, or %NULL to ignore
@@ -983,11 +983,11 @@ g_ucs4_to_utf8 (const gunichar *str,
* @str: a UTF-16 encoded string
* @len: the maximum length (number of #gunichar2) of @str to use.
* If @len < 0, then the string is nul-terminated.
- * @items_read: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): location to store number of
* words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will
* be returned in case @str contains a trailing partial character. If
* an error occurs then the index of the invalid input is stored here.
- * @items_written: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): location to store number
* of bytes written, or %NULL. The value stored here does not include the
* trailing 0 byte.
* @error: location to store the error occurring, or %NULL to ignore
@@ -1138,11 +1138,11 @@ g_utf16_to_utf8 (const gunichar2 *str,
* @str: a UTF-16 encoded string
* @len: the maximum length (number of #gunichar2) of @str to use.
* If @len < 0, then the string is nul-terminated.
- * @items_read: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): location to store number of
* words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will
* be returned in case @str contains a trailing partial character. If
* an error occurs then the index of the invalid input is stored here.
- * @items_written: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): location to store number
* of characters written, or %NULL. The value stored here does not include
* the trailing 0 character.
* @error: location to store the error occurring, or %NULL to ignore
@@ -1276,11 +1276,11 @@ g_utf16_to_ucs4 (const gunichar2 *str,
* @str: a UTF-8 encoded string
* @len: the maximum length (number of bytes) of @str to use.
* If @len < 0, then the string is nul-terminated.
- * @items_read: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): location to store number of
* bytes read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will
* be returned in case @str contains a trailing partial character. If
* an error occurs then the index of the invalid input is stored here.
- * @items_written: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): location to store number
* of #gunichar2 written, or %NULL. The value stored here does not include
* the trailing 0.
* @error: location to store the error occurring, or %NULL to ignore
@@ -1393,10 +1393,10 @@ g_utf8_to_utf16 (const gchar *str,
* @str: a UCS-4 encoded string
* @len: the maximum length (number of characters) of @str to use.
* If @len < 0, then the string is nul-terminated.
- * @items_read: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): location to store number of
* bytes read, or %NULL. If an error occurs then the index of the invalid
* input is stored here.
- * @items_written: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): location to store number
* of #gunichar2 written, or %NULL. The value stored here does not include
* the trailing 0.
* @error: location to store the error occurring, or %NULL to ignore