diff options
author | badcel <33569-badcel@users.noreply.gitlab.gnome.org> | 2023-04-11 20:40:00 +0200 |
---|---|---|
committer | badcel <33569-badcel@users.noreply.gitlab.gnome.org> | 2023-04-11 20:44:06 +0200 |
commit | a89b72389ae71acb2a1b9e061a474ff01b37ab58 (patch) | |
tree | 25f7997160e4c1df379fa673c452ba03f1028dde | |
parent | 718b5d5cd30a2464c19a6dcc338246fa8fa9f6b0 (diff) | |
download | glib-a89b72389ae71acb2a1b9e061a474ff01b37ab58.tar.gz |
Explicitly mark size parameter as (in)
The generated gir file marks the size parameter as "out" by default. This is wrong in the context of a caller allocated buffer with a given size. Explicitly marking the size parameter as (in) fixes the issue.
-rw-r--r-- | gio/gsocket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/gsocket.c b/gio/gsocket.c index 2dc005b63..50ef42f83 100644 --- a/gio/gsocket.c +++ b/gio/gsocket.c @@ -3304,7 +3304,7 @@ g_socket_receive_with_timeout (GSocket *socket, * @socket: a #GSocket * @buffer: (array length=size) (element-type guint8) (out caller-allocates): * a buffer to read data into (which should be at least @size bytes long). - * @size: the number of bytes you want to read from the socket + * @size: (in): the number of bytes you want to read from the socket * @cancellable: (nullable): a %GCancellable or %NULL * @error: #GError for error reporting, or %NULL to ignore. * @@ -3354,7 +3354,7 @@ g_socket_receive (GSocket *socket, * @socket: a #GSocket * @buffer: (array length=size) (element-type guint8) (out caller-allocates): * a buffer to read data into (which should be at least @size bytes long). - * @size: the number of bytes you want to read from the socket + * @size: (in): the number of bytes you want to read from the socket * @blocking: whether to do blocking or non-blocking I/O * @cancellable: (nullable): a %GCancellable or %NULL * @error: #GError for error reporting, or %NULL to ignore. |