[vala/0.54] glib2.0: Add abs() to int8/int16/int32/ssize_t
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.54] glib2.0: Add abs() to int8/int16/int32/ssize_t
- Date: Wed, 10 Aug 2022 15:53:16 +0000 (UTC)
commit 231264dfb5893df0b0c69a3560e9a50ed1dddf63
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 74a683e64..206e3bef2 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]