summaryrefslogtreecommitdiff
path: root/vapi/metadata
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2015-10-28 13:55:55 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2015-10-28 13:59:46 +0100
commit9bc02d92b317a23b0d81f823f14ecbb4e58171e6 (patch)
tree363d347e5cd92e88bf449dbb8a86fa6b5dd66dca /vapi/metadata
parent5cdf094013f5ac0a07c3e39535b5572bdb6d79a5 (diff)
downloadvala-9bc02d92b317a23b0d81f823f14ecbb4e58171e6.tar.gz
gio-2.0: MemoryIn/OutputStream, use a default destroy-function for uint8[] data
Diffstat (limited to 'vapi/metadata')
-rw-r--r--vapi/metadata/Gio-2.0-custom.vala7
-rw-r--r--vapi/metadata/Gio-2.0.metadata4
2 files changed, 9 insertions, 2 deletions
diff --git a/vapi/metadata/Gio-2.0-custom.vala b/vapi/metadata/Gio-2.0-custom.vala
index 3a8692d2f..7c43724ac 100644
--- a/vapi/metadata/Gio-2.0-custom.vala
+++ b/vapi/metadata/Gio-2.0-custom.vala
@@ -1,4 +1,7 @@
namespace GLib {
+ [CCode (cheader_filename = "glib.h", cname = "g_realloc")]
+ public static GLib.ReallocFunc g_realloc;
+
[CCode (cheader_filename = "gio/gio.h")]
namespace Bus {
public async GLib.DBusConnection get (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError;
@@ -100,7 +103,7 @@ namespace GLib {
public class MemoryOutputStream : GLib.OutputStream {
[CCode (has_construct_function = false, type = "GOutputStream*")]
- public MemoryOutputStream ([CCode (array_length_type = "gsize")] owned uint8[]? data, GLib.ReallocFunc? realloc_function, GLib.DestroyNotify? destroy_function);
+ public MemoryOutputStream ([CCode (array_length_type = "gsize")] owned uint8[]? data, GLib.ReallocFunc? realloc_function = GLib.g_realloc, GLib.DestroyNotify? destroy_function = GLib.g_free);
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_native_socket_address_get_type ()")]
@@ -175,7 +178,7 @@ namespace GLib {
public class TlsPassword : GLib.Object {
[CCode (vfunc_name = "set_value")]
- public virtual void set_value_full ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gssize", type = "guchar*")] owned uint8[] value, GLib.DestroyNotify? notify = GLib.free);
+ public virtual void set_value_full ([CCode (array_length_cname = "length", array_length_pos = 1.5, array_length_type = "gssize", type = "guchar*")] owned uint8[] value, GLib.DestroyNotify? notify = GLib.g_free);
}
public class VolumeMonitor : GLib.Object {
diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata
index 1c2eb7708..2a52f62c6 100644
--- a/vapi/metadata/Gio-2.0.metadata
+++ b/vapi/metadata/Gio-2.0.metadata
@@ -143,6 +143,10 @@ InputStream
ListModel
.get_item#virtual_method skip
.get_item#method skip=false abstract
+MemoryInputStream
+ .add_data.destroy default=GLib.g_free
+MemoryInputStream
+ .new_from_data.destroy default=GLib.g_free
MemoryOutputStream
.get_data type="unowned uint8[]"
.steal_data type="uint8[]"