mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-15 23:07:16 +01:00
gsocket: Remove (type) annotation from flags arguments
This is essentially a revert of commit cc7f2f6b28573feb78c43fd16c555c4360b5a714. While those `flags` arguments do accept values of type GSocketMsgFlags, they also accept OS-specific flags which are not defined in GSocketMsgFlags. The use of (type GSocketMsgFlags) makes language bindings like GJS rightfully assert that values passed in to the argument only contain flags from GSocketMsgFlags, which precludes the use of OS-specific flags, and hence breaks various bits of code. See https://gitlab.gnome.org/GNOME/gjs/issues/227#note_460136 and https://gitlab.gnome.org/GNOME/glib/merge_requests/710#note_460249. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: https://gitlab.gnome.org/GNOME/gjs/issues/227
This commit is contained in:
parent
279bd62988
commit
74a5efa840
@ -4540,7 +4540,7 @@ input_message_from_msghdr (const struct msghdr *msg,
|
||||
* @messages: (array length=num_messages) (nullable): a pointer to an
|
||||
* array of #GSocketControlMessages, or %NULL.
|
||||
* @num_messages: number of elements in @messages, or -1.
|
||||
* @flags: (type GSocketMsgFlags): an int containing #GSocketMsgFlags flags
|
||||
* @flags: an int containing #GSocketMsgFlags flags
|
||||
* @cancellable: (nullable): a %GCancellable or %NULL
|
||||
* @error: #GError for error reporting, or %NULL to ignore.
|
||||
*
|
||||
@ -4629,7 +4629,7 @@ g_socket_send_message (GSocket *socket,
|
||||
* @messages: (array length=num_messages) (nullable): a pointer to an
|
||||
* array of #GSocketControlMessages, or %NULL.
|
||||
* @num_messages: number of elements in @messages, or -1.
|
||||
* @flags: (type GSocketMsgFlags): an int containing #GSocketMsgFlags flags
|
||||
* @flags: an int containing #GSocketMsgFlags flags
|
||||
* @timeout_us: the maximum time (in microseconds) to wait, or -1
|
||||
* @bytes_written: (out) (optional): location to store the number of bytes that were written to the socket
|
||||
* @cancellable: (nullable): a %GCancellable or %NULL
|
||||
@ -4862,7 +4862,7 @@ g_socket_send_message_with_timeout (GSocket *socket,
|
||||
* @socket: a #GSocket
|
||||
* @messages: (array length=num_messages): an array of #GOutputMessage structs
|
||||
* @num_messages: the number of elements in @messages
|
||||
* @flags: (type GSocketMsgFlags): an int containing #GSocketMsgFlags flags
|
||||
* @flags: an int containing #GSocketMsgFlags flags
|
||||
* @cancellable: (nullable): a %GCancellable or %NULL
|
||||
* @error: #GError for error reporting, or %NULL to ignore.
|
||||
*
|
||||
@ -5362,7 +5362,7 @@ g_socket_receive_message_with_timeout (GSocket *socket,
|
||||
* @socket: a #GSocket
|
||||
* @messages: (array length=num_messages): an array of #GInputMessage structs
|
||||
* @num_messages: the number of elements in @messages
|
||||
* @flags: (type GSocketMsgFlags): an int containing #GSocketMsgFlags flags for the overall operation
|
||||
* @flags: an int containing #GSocketMsgFlags flags for the overall operation
|
||||
* @cancellable: (nullable): a %GCancellable or %NULL
|
||||
* @error: #GError for error reporting, or %NULL to ignore
|
||||
*
|
||||
@ -5648,7 +5648,7 @@ g_socket_receive_messages_with_timeout (GSocket *socket,
|
||||
* which may be filled with an array of #GSocketControlMessages, or %NULL
|
||||
* @num_messages: (out): a pointer which will be filled with the number of
|
||||
* elements in @messages, or %NULL
|
||||
* @flags: (type GSocketMsgFlags) (inout): a pointer to an int containing #GSocketMsgFlags flags
|
||||
* @flags: (inout): a pointer to an int containing #GSocketMsgFlags flags
|
||||
* @cancellable: a %GCancellable or %NULL
|
||||
* @error: a #GError pointer, or %NULL
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user