[vala/0.46] gio-2.0: Add binding for g_io_error_from_win32_error()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.46] gio-2.0: Add binding for g_io_error_from_win32_error()
- Date: Tue, 24 Mar 2020 09:48:54 +0000 (UTC)
commit 46dbc3d477ac334e7238b6647c7a70eba6a48c7b
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Mar 16 08:08:46 2020 +0100
gio-2.0: Add binding for g_io_error_from_win32_error()
vapi/gio-2.0.vapi | 6 ++++++
vapi/metadata/Gio-2.0-custom.vala | 6 ++++++
2 files changed, 12 insertions(+)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 67e3e2c39..910d47bf2 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -4741,6 +4741,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]