diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-04-07 18:14:16 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-04-19 21:36:28 +0200 |
commit | d0615e6039b1d9fa84c81e63dea85e9e05123781 (patch) | |
tree | d09e6aade5b7b5ee7503704ec6cc87ea715a708b /vapi/glib-2.0.vapi | |
parent | 472765b90cd98c1a628975d20005c46352d665f8 (diff) | |
download | vala-mjog/glib_tz_identifier.tar.gz |
glib-2.0: Wrap TimeZone.identifier() constuctor for proper error supportmjog/glib_tz_identifier
This allows to handle possible null returned by this constructor.
Diffstat (limited to 'vapi/glib-2.0.vapi')
-rw-r--r-- | vapi/glib-2.0.vapi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 0c605b3e5..9bf3156e8 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -3288,8 +3288,16 @@ namespace GLib { public class TimeZone { [Version (deprecated = true, deprecated_since = "2.68", replacement = "TimeZone.identifier")] public TimeZone (string identifier); + [CCode (cname = "g_time_zone_new_identifier")] + TimeZone.new_identifier (string? identifier); [Version (since = "2.68")] - public TimeZone.identifier (string identifier); + [CCode (cname = "vala_g_time_zone_new_identifier")] + public TimeZone.identifier (string? identifier) throws Error { + this.new_identifier (identifier); + if ((TimeZone?) this == null) { + throw new ConvertError.ILLEGAL_SEQUENCE ("Invalid identifier argument"); + } + } public TimeZone.utc (); public TimeZone.local (); [Version (since = "2.58")] |