]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Fix pointer-sign errors of some uint8[]-typed paramters
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 3 Mar 2024 15:47:51 +0000 (16:47 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 4 Mar 2024 09:22:15 +0000 (10:22 +0100)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1529

vapi/gio-2.0.vapi
vapi/metadata/Gio-2.0.metadata

index 0a255672422efe1cfb99af67ae8891b2abaecf27..a5d0ca3dc87514b2bd9bbd32af0c0a1a3658651a 100644 (file)
@@ -2751,26 +2751,26 @@ namespace GLib {
                [Version (since = "2.56")]
                public bool leave_multicast_group_ssm (GLib.InetAddress group, GLib.InetAddress? source_specific, string? iface) throws GLib.Error;
                public bool listen () throws GLib.Error;
-               public ssize_t receive ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public ssize_t receive ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize", type = "gchar*")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [Version (since = "2.80")]
                public GLib.Bytes receive_bytes (size_t size, int64 timeout_us, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [Version (since = "2.80")]
                public GLib.Bytes receive_bytes_from (out GLib.SocketAddress address, size_t size, int64 timeout_us, GLib.Cancellable? cancellable = null) throws GLib.Error;
-               public ssize_t receive_from (out GLib.SocketAddress address, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public ssize_t receive_from (out GLib.SocketAddress address, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize", type = "gchar*")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public ssize_t receive_message (out GLib.SocketAddress? address, [CCode (array_length_cname = "num_vectors", array_length_pos = 2.5)] GLib.InputVector[] vectors, [CCode (array_length_cname = "num_messages", array_length_pos = 3.5)] out GLib.SocketControlMessage[]? messages, ref int flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [Version (since = "2.48")]
                public int receive_messages ([CCode (array_length_cname = "num_messages", array_length_pos = 1.5, array_length_type = "guint")] GLib.InputMessage[] messages, int flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [Version (since = "2.26")]
-               public ssize_t receive_with_blocking ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null) throws GLib.Error;
-               public ssize_t send ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public ssize_t receive_with_blocking ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize", type = "gchar*")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public ssize_t send ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize", type = "const gchar*")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public ssize_t send_message (GLib.SocketAddress? address, [CCode (array_length_cname = "num_vectors", array_length_pos = 2.5)] GLib.OutputVector[] vectors, [CCode (array_length_cname = "num_messages", array_length_pos = 3.5)] GLib.SocketControlMessage[]? messages, int flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [Version (since = "2.60")]
                public GLib.PollableReturn send_message_with_timeout (GLib.SocketAddress? address, [CCode (array_length_cname = "num_vectors", array_length_pos = 2.5)] GLib.OutputVector[] vectors, [CCode (array_length_cname = "num_messages", array_length_pos = 3.5)] GLib.SocketControlMessage[]? messages, int flags, int64 timeout_us, out size_t bytes_written, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [Version (since = "2.44")]
                public int send_messages ([CCode (array_length_cname = "num_messages", array_length_pos = 1.5, array_length_type = "guint")] GLib.OutputMessage[] messages, int flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
-               public ssize_t send_to (GLib.SocketAddress? address, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public ssize_t send_to (GLib.SocketAddress? address, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize", type = "const gchar*")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [Version (since = "2.26")]
-               public ssize_t send_with_blocking ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public ssize_t send_with_blocking ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize", type = "const gchar*")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public void set_blocking (bool blocking);
                [Version (since = "2.32")]
                public void set_broadcast (bool broadcast);
@@ -3987,8 +3987,8 @@ namespace GLib {
                public virtual async GLib.FileInputStream read_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public abstract GLib.FileOutputStream replace (string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public virtual async GLib.FileOutputStream replace_async (string? etag, bool make_backup, GLib.FileCreateFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error;
-               public bool replace_contents ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] contents, string? etag, bool make_backup, GLib.FileCreateFlags flags, out string? new_etag, GLib.Cancellable? cancellable = null) throws GLib.Error;
-               public async bool replace_contents_async ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] contents, string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null, out string? new_etag) throws GLib.Error;
+               public bool replace_contents ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gsize", type = "const char*")] uint8[] contents, string? etag, bool make_backup, GLib.FileCreateFlags flags, out string? new_etag, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public async bool replace_contents_async ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gsize", type = "const char*")] uint8[] contents, string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null, out string? new_etag) throws GLib.Error;
                [CCode (finish_name = "g_file_replace_contents_finish")]
                [Version (since = "2.40")]
                public async bool replace_contents_bytes_async (GLib.Bytes contents, string? etag, bool make_backup, GLib.FileCreateFlags flags, GLib.Cancellable? cancellable = null, out string? new_etag) throws GLib.Error;
index 72e68d230dc1e0991d334bf96f211368f0a0f2dd..0c44ab0a938acb976524d76988dd07c0dede546d 100644 (file)
@@ -139,6 +139,8 @@ File
   .load_contents.cancellable#parameter default=()
   .monitor_dir* throws="GLib.IOError"
   .monitor_file throws="GLib.IOError"
+  .replace_contents.contents ctype="const char*"
+  .replace_contents_async.contents ctype="const char*"
   .replace_contents_bytes_async finish_name="g_file_replace_contents_finish"
 IOExtension
   .ref_class skip=false
@@ -240,9 +242,12 @@ Socket
   .condition_wait throws="GLib.IOError"
   .connection_factory_create_connection parent="GLib.SocketConnection" name="factory_create_connection" symbol_type="function"
   .create_source skip=false type="GLib.SocketSource"
-  .receive.buffer out=false
-  .receive_from.buffer out=false
-  .receive_with_blocking.buffer out=false
+  .receive.buffer out=false ctype="gchar*"
+  .receive_from.buffer out=false ctype="gchar*"
+  .receive_with_blocking.buffer out=false ctype="gchar*"
+  .send.buffer ctype="const gchar*"
+  .send_to.buffer ctype="const gchar*"
+  .send_with_blocking.buffer ctype="const gchar*"
 SocketControlMessage
   .serialize.data type="uint8[]"
 SocketListener