[vala/staging] glib2.0: Add abs() to int8/int16/int32/ssize_t



commit 4e06310e007b858a6032e3c62cc52dc58d22dc66
Author: Gustav Hartvigsson <gustav hartvigsson gmail com>
Date:   Thu Jun 2 11:51:40 2022 +0200

    glib2.0: Add abs() to int8/int16/int32/ssize_t
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/1328

 vapi/glib-2.0.vapi | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 47a585cf5..079d4fa50 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -442,6 +442,8 @@ public struct ssize_t {
        public static ssize_t max (ssize_t a, ssize_t b);
        [CCode (cname = "CLAMP")]
        public ssize_t clamp (ssize_t low, ssize_t high);
+       [CCode (cname = "ABS")]
+       public ssize_t abs ();
 }
 
 [SimpleType]
@@ -522,6 +524,8 @@ public struct int8 {
        public static int8 max (int8 a, int8 b);
        [CCode (cname = "CLAMP")]
        public int8 clamp (int8 low, int8 high);
+       [CCode (cname = "ABS")]
+       public int8 abs ();
 }
 
 [SimpleType]
@@ -573,6 +577,8 @@ public struct int16 {
        public static int16 max (int16 a, int16 b);
        [CCode (cname = "CLAMP")]
        public int16 clamp (int16 low, int16 high);
+       [CCode (cname = "ABS")]
+       public int16 abs ();
 
        [CCode (cname = "GINT16_TO_BE")]
        public int16 to_big_endian ();
@@ -661,6 +667,8 @@ public struct int32 {
        public static int32 max (int32 a, int32 b);
        [CCode (cname = "CLAMP")]
        public int32 clamp (int32 low, int32 high);
+       [CCode (cname = "ABS")]
+       public int32 abs ();
 
        [CCode (cname = "GINT32_TO_BE")]
        public int32 to_big_endian ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]