]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add bindings for g_ascii_string_to_(un)signed()
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 21 Jun 2017 07:58:50 +0000 (09:58 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 21 Jun 2017 08:31:36 +0000 (10:31 +0200)
vapi/glib-2.0.vapi

index 4f2fc612e056682902d4a10b65cf7136d87899f9..1881978a6f853525801010fcec00a9007e1b32ed 100644 (file)
@@ -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")]