Commit 49b807c0 authored by Philip Withnall's avatar Philip Withnall

gsocket: Remove (type) annotation from flags arguments

This is essentially a revert of commit
cc7f2f6b. 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 gjs#227 (comment 460136) and
!710 (comment 460249).
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>

Fixes: gjs#227
parent 00c129f8
......@@ -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
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment