From: Rico Tzschichholz Date: Wed, 21 Jun 2017 07:58:50 +0000 (+0200) Subject: glib-2.0: Add bindings for g_ascii_string_to_(un)signed() X-Git-Tag: 0.37.1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff746718985e0c31fef4cb420d19d3ec6df8a6b7;p=thirdparty%2Fvala.git glib-2.0: Add bindings for g_ascii_string_to_(un)signed() --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 4f2fc612e..1881978a6 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -698,6 +698,10 @@ public struct int64 { return false; } } + + [CCode (cname = "g_ascii_string_to_signed")] + [Version (since = "2.54")] + public static bool from_string (string str, [CCode (pos = 5.1)] out int64 out_num = null, uint @base = 10U, int64 min = int64.MIN, int64 max = int64.MAX) throws GLib.NumberParserError; } [SimpleType] @@ -750,6 +754,10 @@ public struct uint64 { return false; } } + + [CCode (cname = "g_ascii_string_to_unsigned")] + [Version (since = "2.54")] + public static bool from_string (string str, [CCode (pos = 5.1)] out uint64 out_num = null, uint @base = 10U, uint64 min = uint64.MIN, uint64 max = uint64.MAX) throws GLib.NumberParserError; } [SimpleType] @@ -5720,6 +5728,13 @@ namespace GLib { }); } + [Version (since = "2.54")] + public errordomain NumberParserError { + INVALID, + OUT_OF_BOUNDS; + public static GLib.Quark quark (); + } + /* Unix-specific functions. All of these have to include glib-unix.h. */ namespace Unix { [Version (since = "2.30")]