[vala/mjog/glib_tz_identifier] glib-2.0: Fix GLib.TimeZone.identifier not nullable
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/mjog/glib_tz_identifier] glib-2.0: Fix GLib.TimeZone.identifier not nullable
- Date: Wed, 7 Apr 2021 00:52:00 +0000 (UTC)
commit 29968627381824e15b3b682f3ecf8bbd57b78f90
Author: Michael James Gratton <mike vee net>
Date: Tue Apr 6 13:56:23 2021 +1000
glib-2.0: Fix GLib.TimeZone.identifier not nullable
Since g_time_zone_new_identifier can return null, deprecate
ctor and replace it with a static factory method.
vapi/glib-2.0.vapi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 65ba798cc..0d007caf6 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -3288,8 +3288,8 @@ namespace GLib {
public class TimeZone {
[Version (deprecated = true, deprecated_since = "2.68", replacement = "TimeZone.identifier")]
public TimeZone (string identifier);
- [Version (since = "2.68")]
- public TimeZone.identifier (string identifier);
+ [Version (deprecated = true, deprecated_since = "2.68", replacement =
"TimeZone.new_from_identifier")]
+ public TimeZone.identifier (string? identifier);
public TimeZone.utc ();
public TimeZone.local ();
[Version (since = "2.58")]
@@ -3301,6 +3301,10 @@ namespace GLib {
public unowned string get_identifier ();
public int32 get_offset (int interval);
public bool is_dst (int interval);
+
+ [CCode (cname = "g_time_zone_new_identifier")]
+ [Version (since = "2.68")]
+ public static TimeZone? new_from_identifier (string? identifier);
}
/* Random Numbers */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]