From: Rico Tzschichholz Date: Tue, 17 Jan 2017 11:52:47 +0000 (+0100) Subject: vapi: "ref" functions must return an unowned value X-Git-Tag: 0.35.4~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73105043ef3b12cdac538d4a9b8059ad7e02f8d5;p=thirdparty%2Fvala.git vapi: "ref" functions must return an unowned value Otherwise vala would automatically add a corresponding "unref" call. --- diff --git a/vapi/clutter-1.0.vapi b/vapi/clutter-1.0.vapi index fa62002d3..b554ab882 100644 --- a/vapi/clutter-1.0.vapi +++ b/vapi/clutter-1.0.vapi @@ -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 (); } diff --git a/vapi/gdk-3.0.vapi b/vapi/gdk-3.0.vapi index 6485a58d7..b3984f2bd 100644 --- a/vapi/gdk-3.0.vapi +++ b/vapi/gdk-3.0.vapi @@ -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 (); } diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi index edb5c5278..464e4697f 100644 --- a/vapi/gio-2.0.vapi +++ b/vapi/gio-2.0.vapi @@ -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 ()")] diff --git a/vapi/gobject-2.0.vapi b/vapi/gobject-2.0.vapi index 1aa4296ad..d8ec674cb 100644 --- a/vapi/gobject-2.0.vapi +++ b/vapi/gobject-2.0.vapi @@ -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")] diff --git a/vapi/gstreamer-1.0.vapi b/vapi/gstreamer-1.0.vapi index 41f5c8bbb..ccda643c2 100644 --- a/vapi/gstreamer-1.0.vapi +++ b/vapi/gstreamer-1.0.vapi @@ -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 (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); diff --git a/vapi/gstreamer-video-1.0.vapi b/vapi/gstreamer-video-1.0.vapi index 794cce3b5..9429619dc 100644 --- a/vapi/gstreamer-video-1.0.vapi +++ b/vapi/gstreamer-video-1.0.vapi @@ -35,7 +35,7 @@ namespace Gst { public uint32 system_frame_number; [CCode (simple_generics = true)] public T get_user_data (); - public Gst.Video.CodecFrame @ref (); + public unowned Gst.Video.CodecFrame @ref (); [CCode (simple_generics = true)] public void set_user_data (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 ()")] diff --git a/vapi/gtk+-4.0.vapi b/vapi/gtk+-4.0.vapi index 2fa3fe342..55f2e5858 100644 --- a/vapi/gtk+-4.0.vapi +++ b/vapi/gtk+-4.0.vapi @@ -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")] diff --git a/vapi/libgdata.vapi b/vapi/libgdata.vapi index ab8fc6427..8e33bb342 100644 --- a/vapi/libgdata.vapi +++ b/vapi/libgdata.vapi @@ -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 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 ()")] diff --git a/vapi/metadata/Clutter-1.0.metadata b/vapi/metadata/Clutter-1.0.metadata index ca27a527a..264a44a1a 100644 --- a/vapi/metadata/Clutter-1.0.metadata +++ b/vapi/metadata/Clutter-1.0.metadata @@ -9,6 +9,8 @@ Perspective struct Units struct Vertex struct +*.ref unowned + init.argv unowned init_with_args .argv unowned diff --git a/vapi/metadata/GData-0.0.metadata b/vapi/metadata/GData-0.0.metadata index 067e4077a..a013a0b7d 100644 --- a/vapi/metadata/GData-0.0.metadata +++ b/vapi/metadata/GData-0.0.metadata @@ -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 diff --git a/vapi/metadata/Gdk-3.0.metadata b/vapi/metadata/Gdk-3.0.metadata index ca9c9ea1d..e9645503e 100644 --- a/vapi/metadata/Gdk-3.0.metadata +++ b/vapi/metadata/Gdk-3.0.metadata @@ -1,5 +1,8 @@ KEY_* name="KEY_(.+)" parent="Gdk.Key" selection_* name="selection_(.+)" parent="Gdk.Selection" + +*.ref unowned + Atom struct Color struct Cursor abstract=false diff --git a/vapi/metadata/Gdk-4.0.metadata b/vapi/metadata/Gdk-4.0.metadata index 37aed5439..fa13f4833 100644 --- a/vapi/metadata/Gdk-4.0.metadata +++ b/vapi/metadata/Gdk-4.0.metadata @@ -1,5 +1,8 @@ KEY_* name="KEY_(.+)" parent="Gdk.Key" selection_* name="selection_(.+)" parent="Gdk.Selection" + +*.ref unowned + Atom struct Cursor abstract=false Device diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata index 4911f6acc..e7045710a 100644 --- a/vapi/metadata/Gio-2.0.metadata +++ b/vapi/metadata/Gio-2.0.metadata @@ -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 diff --git a/vapi/metadata/Gst-1.0.metadata b/vapi/metadata/Gst-1.0.metadata index abbbdc191..e2f64afed 100644 --- a/vapi/metadata/Gst-1.0.metadata +++ b/vapi/metadata/Gst-1.0.metadata @@ -1,5 +1,7 @@ *.ABI._gst_reserved* skip +*.ref unowned + // Return non-boxed types MiniObject .copy skip=false diff --git a/vapi/metadata/GstVideo-1.0.metadata b/vapi/metadata/GstVideo-1.0.metadata index bfb330c3d..b115e0ec6 100644 --- a/vapi/metadata/GstVideo-1.0.metadata +++ b/vapi/metadata/GstVideo-1.0.metadata @@ -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" diff --git a/vapi/metadata/Gtk-4.0.metadata b/vapi/metadata/Gtk-4.0.metadata index 6412fc7bd..19aaa4d4d 100644 --- a/vapi/metadata/Gtk-4.0.metadata +++ b/vapi/metadata/Gtk-4.0.metadata @@ -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. diff --git a/vapi/metadata/Pango-1.0.metadata b/vapi/metadata/Pango-1.0.metadata index ed78402e6..59a4b4395 100644 --- a/vapi/metadata/Pango-1.0.metadata +++ b/vapi/metadata/Pango-1.0.metadata @@ -75,3 +75,5 @@ AttrClass Color struct GlyphItemIter struct Matrix struct + +*.ref unowned diff --git a/vapi/metadata/Rest-0.7.metadata b/vapi/metadata/Rest-0.7.metadata index a84f7518e..e02b80a2c 100644 --- a/vapi/metadata/Rest-0.7.metadata +++ b/vapi/metadata/Rest-0.7.metadata @@ -50,3 +50,5 @@ ProxyCallUploadCallback cheader_filename="rest/rest-proxy-call.h" .userdata closure=5 hmac_sha1 skip=true + +*.ref unowned diff --git a/vapi/metadata/WebKit2-4.0.metadata b/vapi/metadata/WebKit2-4.0.metadata index ae952ed07..1e3bbb39e 100644 --- a/vapi/metadata/WebKit2-4.0.metadata +++ b/vapi/metadata/WebKit2-4.0.metadata @@ -14,3 +14,5 @@ WebResource .failed#signal.error type="GLib.Error" WebView .load_failed#signal.error type="GLib.Error" + +*.ref unowned diff --git a/vapi/pango.vapi b/vapi/pango.vapi index 304f579ff..4dc314d5e 100644 --- a/vapi/pango.vapi +++ b/vapi/pango.vapi @@ -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); } diff --git a/vapi/rest-0.7.vapi b/vapi/rest-0.7.vapi index 71b9d50f8..d8a7d44fc 100644 --- a/vapi/rest-0.7.vapi +++ b/vapi/rest-0.7.vapi @@ -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 (); } diff --git a/vapi/webkit2gtk-4.0.vapi b/vapi/webkit2gtk-4.0.vapi index 69b54268b..98d05e239 100644 --- a/vapi/webkit2gtk-4.0.vapi +++ b/vapi/webkit2gtk-4.0.vapi @@ -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")]