Commit 73105043 authored by Rico Tzschichholz's avatar Rico Tzschichholz

vapi: "ref" functions must return an unowned value

Otherwise vala would automatically add a corresponding "unref" call.
parent ac2af40e
......@@ -6790,7 +6790,7 @@ namespace Clutter {
public void add_child (Clutter.PaintNode child);
public void add_rectangle (Clutter.ActorBox rect);
public void add_texture_rectangle (Clutter.ActorBox rect, float x_1, float y_1, float x_2, float y_2);
public Clutter.PaintNode @ref ();
public unowned Clutter.PaintNode @ref ();
public void set_name (string name);
public void unref ();
}
......
......@@ -4611,7 +4611,7 @@ namespace Gdk {
[Version (since = "3.10")]
public Cairo.Surface? get_surface (out double x_hot, out double y_hot);
[Version (deprecated = true, deprecated_since = "3.0")]
public Gdk.Cursor @ref ();
public unowned Gdk.Cursor @ref ();
[Version (deprecated = true, deprecated_since = "3.0")]
public void unref ();
public Gdk.CursorType cursor_type { get; construct; }
......@@ -5370,7 +5370,7 @@ namespace Gdk {
[Version (since = "3.8")]
public int64 get_refresh_interval ();
[Version (since = "3.8")]
public Gdk.FrameTimings @ref ();
public unowned Gdk.FrameTimings @ref ();
[Version (since = "3.8")]
public void unref ();
}
......
......@@ -588,7 +588,7 @@ namespace GLib {
public string key;
public int ref_count;
public string value;
public GLib.DBusAnnotationInfo @ref ();
public unowned GLib.DBusAnnotationInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", ref_function = "g_dbus_arg_info_ref", type_id = "g_dbus_arg_info_get_type ()", unref_function = "g_dbus_arg_info_unref")]
......@@ -600,7 +600,7 @@ namespace GLib {
public string name;
public int ref_count;
public string signature;
public GLib.DBusArgInfo @ref ();
public unowned GLib.DBusArgInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_auth_observer_get_type ()")]
......@@ -702,7 +702,7 @@ namespace GLib {
public unowned GLib.DBusMethodInfo lookup_method (string name);
public unowned GLib.DBusPropertyInfo lookup_property (string name);
public unowned GLib.DBusSignalInfo lookup_signal (string name);
public GLib.DBusInterfaceInfo @ref ();
public unowned GLib.DBusInterfaceInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_interface_skeleton_get_type ()")]
......@@ -814,7 +814,7 @@ namespace GLib {
[CCode (array_length = false, array_null_terminated = true)]
public GLib.DBusArgInfo[] out_args;
public int ref_count;
public GLib.DBusMethodInfo @ref ();
public unowned GLib.DBusMethodInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_method_invocation_get_type ()")]
......@@ -860,7 +860,7 @@ namespace GLib {
public DBusNodeInfo.for_xml (string xml_data) throws GLib.Error;
public void generate_xml (uint indent, GLib.StringBuilder string_builder);
public unowned GLib.DBusInterfaceInfo lookup_interface (string name);
public GLib.DBusNodeInfo @ref ();
public unowned GLib.DBusNodeInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_manager_client_get_type ()")]
......@@ -945,7 +945,7 @@ namespace GLib {
public string name;
public int ref_count;
public string signature;
public GLib.DBusPropertyInfo @ref ();
public unowned GLib.DBusPropertyInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_proxy_get_type ()")]
......@@ -1033,7 +1033,7 @@ namespace GLib {
public GLib.DBusArgInfo[] args;
public string name;
public int ref_count;
public GLib.DBusSignalInfo @ref ();
public unowned GLib.DBusSignalInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_data_input_stream_get_type ()")]
......@@ -1128,7 +1128,7 @@ namespace GLib {
public void add (string name, GLib.FileAttributeType type, GLib.FileAttributeInfoFlags flags);
public GLib.FileAttributeInfoList dup ();
public unowned GLib.FileAttributeInfo? lookup (string name);
public GLib.FileAttributeInfoList @ref ();
public unowned GLib.FileAttributeInfoList @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", ref_function = "g_file_attribute_matcher_ref", type_id = "g_file_attribute_matcher_get_type ()", unref_function = "g_file_attribute_matcher_unref")]
......@@ -1140,7 +1140,7 @@ namespace GLib {
public unowned string enumerate_next ();
public bool matches (string attribute);
public bool matches_only (string attribute);
public GLib.FileAttributeMatcher @ref ();
public unowned GLib.FileAttributeMatcher @ref ();
public GLib.FileAttributeMatcher subtract (GLib.FileAttributeMatcher subtract);
[Version (since = "2.32")]
public string to_string ();
......@@ -2025,7 +2025,7 @@ namespace GLib {
public static GLib.Resource load (string filename) throws GLib.Error;
public GLib.Bytes lookup_data (string path, GLib.ResourceLookupFlags lookup_flags) throws GLib.Error;
public GLib.InputStream open_stream (string path, GLib.ResourceLookupFlags lookup_flags) throws GLib.Error;
public GLib.Resource @ref ();
public unowned GLib.Resource @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_settings_get_type ()")]
......@@ -2217,7 +2217,7 @@ namespace GLib {
[CCode (array_length = false, array_null_terminated = true)]
[Version (since = "2.46")]
public string[] list_keys ();
public GLib.SettingsSchema @ref ();
public unowned GLib.SettingsSchema @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", ref_function = "g_settings_schema_key_ref", type_id = "g_settings_schema_key_get_type ()", unref_function = "g_settings_schema_key_unref")]
......@@ -2238,7 +2238,7 @@ namespace GLib {
[Version (since = "2.40")]
public bool range_check (GLib.Variant value);
[Version (since = "2.40")]
public GLib.SettingsSchemaKey @ref ();
public unowned GLib.SettingsSchemaKey @ref ();
[Version (since = "2.40")]
public void unref ();
}
......@@ -2253,7 +2253,7 @@ namespace GLib {
[Version (since = "2.40")]
public void list_schemas (bool recursive, [CCode (array_length = false, array_null_terminated = true)] out string[] non_relocatable, [CCode (array_length = false, array_null_terminated = true)] out string[] relocatable);
public GLib.SettingsSchema? lookup (string schema_id, bool recursive);
public GLib.SettingsSchemaSource @ref ();
public unowned GLib.SettingsSchemaSource @ref ();
public void unref ();
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_simple_action_get_type ()")]
......
......@@ -224,8 +224,8 @@ namespace GLib {
public unowned GLib.ParamSpec get_redirect_target ();
[CCode (cname = "g_param_spec_internal")]
public ParamSpec.@internal (GLib.Type param_type, string name, string nick, string blurb, GLib.ParamFlags flags);
public GLib.ParamSpec @ref ();
public GLib.ParamSpec ref_sink ();
public unowned GLib.ParamSpec @ref ();
public unowned GLib.ParamSpec ref_sink ();
public void set_qdata (GLib.Quark quark, void* data);
public void set_qdata_full (GLib.Quark quark, void* data, GLib.DestroyNotify destroy);
[CCode (cname = "g_param_value_set_default")]
......
......@@ -1037,7 +1037,7 @@ namespace Gst {
public DateTime.now_local_time ();
[CCode (has_construct_function = false)]
public DateTime.now_utc ();
public Gst.DateTime @ref ();
public unowned Gst.DateTime @ref ();
public GLib.DateTime? to_g_date_time ();
public string? to_iso8601_string ();
public void unref ();
......@@ -1683,7 +1683,7 @@ namespace Gst {
public bool is_writable ();
public bool @lock (Gst.LockFlags flags);
public Gst.MiniObject make_writable ();
public Gst.MiniObject @ref ();
public unowned Gst.MiniObject @ref ();
public static bool replace (ref Gst.MiniObject? olddata, Gst.MiniObject? newdata);
[CCode (simple_generics = true)]
public void set_qdata<T> (GLib.Quark quark, owned T data);
......@@ -1718,7 +1718,7 @@ namespace Gst {
public bool has_as_ancestor (Gst.Object ancestor);
[Version (since = "1.6")]
public bool has_as_parent (Gst.Object parent);
public Gst.Object @ref ();
public unowned Gst.Object @ref ();
public bool remove_control_binding (Gst.ControlBinding binding);
public static bool replace (ref Gst.Object? oldobj, Gst.Object? newobj);
public void set_control_binding_disabled (string property_name, bool disabled);
......
......@@ -35,7 +35,7 @@ namespace Gst {
public uint32 system_frame_number;
[CCode (simple_generics = true)]
public T get_user_data<T> ();
public Gst.Video.CodecFrame @ref ();
public unowned Gst.Video.CodecFrame @ref ();
[CCode (simple_generics = true)]
public void set_user_data<T> (owned T user_data);
public void unref ();
......@@ -48,7 +48,7 @@ namespace Gst {
public weak Gst.Caps caps;
public weak Gst.Buffer codec_data;
public weak Gst.Video.Info info;
public Gst.Video.CodecState @ref ();
public unowned Gst.Video.CodecState @ref ();
public void unref ();
}
[CCode (cheader_filename = "gst/video/video.h", cname = "GstColorBalanceChannel", lower_case_cprefix = "gst_color_balance_channel_", type_id = "gst_color_balance_channel_get_type ()")]
......
......@@ -5584,7 +5584,7 @@ namespace Gdk {
[Version (since = "3.8")]
public int64 get_refresh_interval ();
[Version (since = "3.8")]
public Gdk.FrameTimings @ref ();
public unowned Gdk.FrameTimings @ref ();
[Version (since = "3.8")]
public void unref ();
}
......@@ -8781,7 +8781,7 @@ namespace Gtk {
public Gtk.CssSectionType get_section_type ();
public uint get_start_line ();
public uint get_start_position ();
public Gtk.CssSection @ref ();
public unowned Gtk.CssSection @ref ();
public void unref ();
}
[CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_dialog_get_type ()")]
......@@ -12151,7 +12151,7 @@ namespace Gtk {
public bool is_local ();
public string last_application ();
public bool match (Gtk.RecentInfo info_b);
public Gtk.RecentInfo @ref ();
public unowned Gtk.RecentInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_recent_manager_get_type ()")]
......@@ -13103,7 +13103,7 @@ namespace Gtk {
[Version (since = "2.6")]
public void add_uri_targets (uint info);
public bool find (Gdk.Atom target, out uint info);
public Gtk.TargetList @ref ();
public unowned Gtk.TargetList @ref ();
public void remove (Gdk.Atom target);
public void unref ();
}
......@@ -14888,7 +14888,7 @@ namespace Gtk {
[Version (since = "3.0")]
public void prepend_type (GLib.Type type);
[Version (since = "3.2")]
public Gtk.WidgetPath @ref ();
public unowned Gtk.WidgetPath @ref ();
[Version (since = "3.2")]
public string to_string ();
[Version (since = "3.2")]
......
......@@ -1097,7 +1097,7 @@ namespace GData {
public uint64 get_property_hits (string property);
public unowned GData.FreebaseTopicValue? get_property_value (string property, int64 item);
public GLib.GenericArray<weak string> list_properties ();
public GData.FreebaseTopicObject @ref ();
public unowned GData.FreebaseTopicObject @ref ();
public void unref ();
}
[CCode (cheader_filename = "gdata/gdata.h", type_id = "gdata_freebase_topic_query_get_type ()")]
......@@ -1137,7 +1137,7 @@ namespace GData {
public int64 get_timestamp ();
public GLib.Type get_value_type ();
public bool is_image ();
public GData.FreebaseTopicValue @ref ();
public unowned GData.FreebaseTopicValue @ref ();
public void unref ();
}
[CCode (cheader_filename = "gdata/gdata.h", type_id = "gdata_gcontact_calendar_get_type ()")]
......
......@@ -9,6 +9,8 @@ Perspective struct
Units struct
Vertex struct
*.ref unowned
init.argv unowned
init_with_args
.argv unowned
......
......@@ -13,4 +13,6 @@ CONTACTS_GROUP_* name="CONTACTS_GROUP_(.+)" parent="GData.ContactsGroupType"
CONTACTS_PRIORITY_* name="CONTACTS_PRIORITY_(.+)" parent="GData.ContactsPriority"
CONTACTS_SENSITIVITY_* name="CONTACTS_SENSITIVITY_(.+)" parent="GData.ContactsSensitivity"
Parsable.get_json#method name="get_json_string"
\ No newline at end of file
Parsable.get_json#method name="get_json_string"
*.ref unowned
KEY_* name="KEY_(.+)" parent="Gdk.Key"
selection_* name="selection_(.+)" parent="Gdk.Selection"
*.ref unowned
Atom struct
Color struct
Cursor abstract=false
......
KEY_* name="KEY_(.+)" parent="Gdk.Key"
selection_* name="selection_(.+)" parent="Gdk.Selection"
*.ref unowned
Atom struct
Cursor abstract=false
Device
......
......@@ -360,6 +360,7 @@ DataInputStream
.read_line.length default=null
// Forward upstream
*.ref unowned
NativeSocketAddress skip
content_type_from_mime_type nullable
content_type_get_mime_type nullable
......
*.ABI._gst_reserved* skip
*.ref unowned
// Return non-boxed types
MiniObject
.copy skip=false
......
......@@ -3,6 +3,8 @@ Video* name="Video(.+)"
VIDEO_* name="VIDEO_(.+)"
video_* name="video_(.+)"
*.ref unowned
VideoOverlay
.set_render_rectangle#virtual_method virtual
.set_render_rectangle#method name="try_set_render_rectangle"
......
......@@ -405,6 +405,7 @@ TreeView
// Sure
binding_set_by_class.object_class type="GLib.ObjectClass"
*.ref unowned
// These delegate types don't have targets in the typedefs, but they
// get called with a target.
......
......@@ -75,3 +75,5 @@ AttrClass
Color struct
GlyphItemIter struct
Matrix struct
*.ref unowned
......@@ -50,3 +50,5 @@ ProxyCallUploadCallback cheader_filename="rest/rest-proxy-call.h"
.userdata closure=5
hmac_sha1 skip=true
*.ref unowned
......@@ -14,3 +14,5 @@ WebResource
.failed#signal.error type="GLib.Error"
WebView
.load_failed#signal.error type="GLib.Error"
*.ref unowned
......@@ -80,7 +80,7 @@ namespace Pango {
public void insert (owned Pango.Attribute attr);
public void insert_before (owned Pango.Attribute attr);
[Version (since = "1.10")]
public Pango.AttrList @ref ();
public unowned Pango.AttrList @ref ();
public void splice (Pango.AttrList other, int pos, int len);
public void unref ();
}
......@@ -305,7 +305,7 @@ namespace Pango {
public int get_underline_position ();
[Version (since = "1.6")]
public int get_underline_thickness ();
public Pango.FontMetrics? @ref ();
public unowned Pango.FontMetrics? @ref ();
public void unref ();
}
[CCode (cheader_filename = "pango/pango.h", type_id = "pango_fontset_get_type ()")]
......@@ -513,7 +513,7 @@ namespace Pango {
public void get_x_ranges (int start_index, int end_index, [CCode (array_length_cname = "n_ranges", array_length_pos = 3.1)] out int[] ranges);
public void index_to_x (int index_, bool trailing, out int x_pos);
[Version (since = "1.10")]
public Pango.LayoutLine @ref ();
public unowned Pango.LayoutLine @ref ();
public void unref ();
public bool x_to_index (int x_pos, out int index_, out int trailing);
}
......
......@@ -72,7 +72,7 @@ namespace Rest {
public unowned global::string get_file_name ();
public unowned global::string get_name ();
public bool is_string ();
public Rest.Param @ref ();
public unowned Rest.Param @ref ();
[CCode (has_construct_function = false)]
public Param.string (global::string name, Rest.MemoryUse use, global::string string);
public void unref ();
......@@ -185,7 +185,7 @@ namespace Rest {
public void free ();
public unowned string get_attr (string attr_name);
public string print ();
public Rest.XmlNode @ref ();
public unowned Rest.XmlNode @ref ();
public void set_content (string value);
public void unref ();
}
......
......@@ -276,7 +276,7 @@ namespace WebKit {
[CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_javascript_result_ref", type_id = "webkit_javascript_result_get_type ()", unref_function = "webkit_javascript_result_unref")]
[Compact]
public class JavascriptResult {
public WebKit.JavascriptResult @ref ();
public unowned WebKit.JavascriptResult @ref ();
public void unref ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_mime_info_ref", type_id = "webkit_mime_info_get_type ()", unref_function = "webkit_mime_info_unref")]
......@@ -286,7 +286,7 @@ namespace WebKit {
[CCode (array_length = false, array_null_terminated = true)]
public unowned string[] get_extensions ();
public unowned string get_mime_type ();
public WebKit.MimeInfo @ref ();
public unowned WebKit.MimeInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_navigation_action_get_type ()")]
......@@ -689,7 +689,7 @@ namespace WebKit {
[Version (since = "2.6")]
public UserScript (string source, WebKit.UserContentInjectedFrames injected_frames, WebKit.UserScriptInjectionTime injection_time, [CCode (array_length = false, array_null_terminated = true)] string[]? whitelist, [CCode (array_length = false, array_null_terminated = true)] string[]? blacklist);
[Version (since = "2.6")]
public WebKit.UserScript @ref ();
public unowned WebKit.UserScript @ref ();
[Version (since = "2.6")]
public void unref ();
}
......@@ -700,7 +700,7 @@ namespace WebKit {
[Version (since = "2.6")]
public UserStyleSheet (string source, WebKit.UserContentInjectedFrames injected_frames, WebKit.UserStyleLevel level, [CCode (array_length = false, array_null_terminated = true)] string[]? whitelist, [CCode (array_length = false, array_null_terminated = true)] string[]? blacklist);
[Version (since = "2.6")]
public WebKit.UserStyleSheet @ref ();
public unowned WebKit.UserStyleSheet @ref ();
[Version (since = "2.6")]
public void unref ();
}
......@@ -937,7 +937,7 @@ namespace WebKit {
[Version (since = "2.12")]
public WebViewSessionState (GLib.Bytes data);
[Version (since = "2.12")]
public WebKit.WebViewSessionState @ref ();
public unowned WebKit.WebViewSessionState @ref ();
[Version (since = "2.12")]
public GLib.Bytes serialize ();
[Version (since = "2.12")]
......
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