[glib/glib-2-60: 1/2] gsocket: Remove (type) annotation from flags arguments



commit 74a5efa84063de688b7026e0fcb18318ce9f5ab1
Author: Philip Withnall <withnall endlessm com>
Date:   Fri Mar 15 10:28:14 2019 +0000

    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

 gio/gsocket.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gio/gsocket.c b/gio/gsocket.c
index b7472a44b..d4372c544 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -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
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]