summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-03-16 08:08:46 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2020-03-19 14:47:45 +0100
commit36bfca5805eda1531df290b1ef62adc5a0a7f3a2 (patch)
tree9a2feb611d1553e2af2ef262a06aa2f8588ccfb2
parentf9a1b7749517cd839893dbf4787511d7a842ebfe (diff)
downloadvala-36bfca5805eda1531df290b1ef62adc5a0a7f3a2.tar.gz
gio-2.0: Add binding for g_io_error_from_win32_error()
-rw-r--r--vapi/gio-2.0.vapi6
-rw-r--r--vapi/metadata/Gio-2.0-custom.vala6
2 files changed, 12 insertions, 0 deletions
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 05613546d..daa566e42 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -4767,6 +4767,12 @@ namespace GLib {
public static GLib.IOError from_errno (int err_no) {
return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), GLib.IOError._from_errno (err_no), "%s", GLib.strerror (err_no));
}
+ [CCode (cname = "g_io_error_from_win32_error")]
+ public static int _from_win32_error (int error_code);
+ [CCode (cname = "vala_g_io_error_from_win32_error")]
+ public static GLib.IOError from_win32_error (int error_code) {
+ return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), GLib.IOError._from_win32_error (error_code), "%s", GLib.Win32.error_message (error_code));
+ }
[CCode (cheader_filename = "gio/gio.h", cname = "g_io_error_from_errno")]
public static int _from_errno (int err_no);
[CCode (cheader_filename = "gio/gio.h")]
diff --git a/vapi/metadata/Gio-2.0-custom.vala b/vapi/metadata/Gio-2.0-custom.vala
index f83892ded..9bb88ae92 100644
--- a/vapi/metadata/Gio-2.0-custom.vala
+++ b/vapi/metadata/Gio-2.0-custom.vala
@@ -169,6 +169,12 @@ namespace GLib {
public static GLib.IOError from_errno (int err_no) {
return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), GLib.IOError._from_errno (err_no), "%s", GLib.strerror (err_no));
}
+ [CCode (cname = "g_io_error_from_win32_error")]
+ public static int _from_win32_error (int error_code);
+ [CCode (cname = "vala_g_io_error_from_win32_error")]
+ public static GLib.IOError from_win32_error (int error_code) {
+ return (GLib.IOError) new GLib.Error (GLib.IOError.quark (), GLib.IOError._from_win32_error (error_code), "%s", GLib.Win32.error_message (error_code));
+ }
}
public delegate void SimpleActionActivateCallback (SimpleAction action, Variant? parameter);