[vala/staging: 2/2] glib-2.0: Wrap TimeZone.identifier() constuctor for proper error support
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/2] glib-2.0: Wrap TimeZone.identifier() constuctor for proper error support
- Date: Mon, 19 Apr 2021 18:59:19 +0000 (UTC)
commit 3b424527090bed949aabce829a6fade98301c3ba
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Apr 7 18:14:16 2021 +0200
glib-2.0: Wrap TimeZone.identifier() constuctor for proper error support
This allows to handle possible null returned by this constructor.
vapi/glib-2.0.vapi | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 0c605b3e5..233e2da51 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -3289,7 +3289,16 @@ namespace GLib {
[Version (deprecated = true, deprecated_since = "2.68", replacement = "TimeZone.identifier")]
public TimeZone (string identifier);
[Version (since = "2.68")]
- public TimeZone.identifier (string identifier);
+ [CCode (cname = "g_time_zone_new_identifier")]
+ TimeZone.new_identifier (string? identifier);
+ [Version (since = "2.68")]
+ [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")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]