Add byte order and number format constants, patch by Ali Sabil
authorJürg Billeter <j@bitron.ch>
Tue, 3 Jun 2008 20:24:02 +0000 (20:24 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Tue, 3 Jun 2008 20:24:02 +0000 (20:24 +0000)
2008-06-03  Jürg Billeter  <j@bitron.ch>

* vapi/glib-2.0.vapi:

Add byte order and number format constants, patch by Ali Sabil

svn path=/trunk/; revision=1557

ChangeLog
vapi/glib-2.0.vapi

index f3a3940..fec61c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-06-03  Jürg Billeter  <j@bitron.ch>
 
+       * vapi/glib-2.0.vapi:
+
+       Add byte order and number format constants, patch by Ali Sabil
+
+2008-06-03  Jürg Billeter  <j@bitron.ch>
+
        * vapi/packages/gtk+-2.0/:
 
        Nullable fixes, patch by Nicolas Joseph, fixes bug 536478
index d20c3f9..5398730 100644 (file)
@@ -181,6 +181,11 @@ public struct size_t {
        [CCode (cname = "G_MAXSIZE")]
        public static ulong MAX;
 
+       [CCode (cname = "G_GSIZE_FORMAT")]
+       public const string FORMAT;
+       [CCode (cname = "G_GSIZE_MODIFIER")]
+       public const string FORMAT_MODIFIER;
+
        [CCode (cname = "g_strdup_printf", instance_pos = -1)]
        public string to_string (string format = "%zu");
 
@@ -200,6 +205,11 @@ public struct ssize_t {
        [CCode (cname = "G_MAXSSIZE")]
        public static long MAX;
 
+       [CCode (cname = "G_GSSIZE_FORMAT")]
+       public const string FORMAT;
+       [CCode (cname = "G_GSIZE_MODIFIER")]
+       public const string FORMAT_MODIFIER;
+
        [CCode (cname = "g_strdup_printf", instance_pos = -1)]
        public string to_string (string format = "%zi");
 
@@ -248,6 +258,11 @@ public struct int16 {
        [CCode (cname = "G_MAXINT16")]
        public static int16 MAX;
 
+       [CCode (cname = "G_GINT16_FORMAT")]
+       public const string FORMAT;
+       [CCode (cname = "G_GINT16_MODIFIER")]
+       public const string FORMAT_MODIFIER;
+
        [CCode (cname = "g_strdup_printf", instance_pos = -1)]
        public string to_string (string format = "%hi");
 
@@ -264,6 +279,11 @@ public struct uint16 {
        [CCode (cname = "G_MAXUINT16")]
        public static uint16 MAX;
 
+       [CCode (cname = "G_GUINT16_FORMAT")]
+       public const string FORMAT;
+       [CCode (cname = "G_GINT16_MODIFIER")]
+       public const string FORMAT_MODIFIER;
+
        [CCode (cname = "g_strdup_printf", instance_pos = -1)]
        public string to_string (string format = "%hu");
 
@@ -280,6 +300,11 @@ public struct int32 {
        [CCode (cname = "G_MAXINT32")]
        public static int32 MAX;
 
+       [CCode (cname = "G_GINT32_FORMAT")]
+       public const string FORMAT;
+       [CCode (cname = "G_GINT32_MODIFIER")]
+       public const string FORMAT_MODIFIER;
+
        [CCode (cname = "g_strdup_printf", instance_pos = -1)]
        public string to_string (string format = "%i");
 
@@ -296,6 +321,11 @@ public struct uint32 {
        [CCode (cname = "G_MAXUINT32")]
        public static uint32 MAX;
 
+       [CCode (cname = "G_GUINT32_FORMAT")]
+       public const string FORMAT;
+       [CCode (cname = "G_GINT32_MODIFIER")]
+       public const string FORMAT_MODIFIER;
+
        [CCode (cname = "g_strdup_printf", instance_pos = -1)]
        public string to_string (string format = "%u");
 
@@ -312,6 +342,11 @@ public struct int64 {
        [CCode (cname = "G_MAXINT64")]
        public static int64 MAX;
 
+       [CCode (cname = "G_GINT64_FORMAT")]
+       public const string FORMAT;
+       [CCode (cname = "G_GINT64_MODIFIER")]
+       public const string FORMAT_MODIFIER;
+
        [CCode (cname = "g_strdup_printf", instance_pos = -1)]
        public string to_string (string format = "%lli");
 
@@ -328,6 +363,11 @@ public struct uint64 {
        [CCode (cname = "G_MAXUINT64")]
        public static uint64 MAX;
 
+       [CCode (cname = "G_GUINT64_FORMAT")]
+       public const string FORMAT;
+       [CCode (cname = "G_GINT64_MODIFIER")]
+       public const string FORMAT_MODIFIER;
+
        [CCode (cname = "g_strdup_printf", instance_pos = -1)]
        public string to_string (string format = "%llu");
 
@@ -1097,6 +1137,18 @@ namespace GLib {
                public static float scalbf (float x, float n);
        }
 
+       /* Byte order */
+       namespace ByteOrder {
+               [CCode (cname = "G_BYTE_ORDER")]
+               public const int HOST;
+               [CCode (cname = "G_LITTLE_ENDIAN")]
+               public const int LITTLE_ENDIAN;
+               [CCode (cname = "G_BIG_ENDIAN")]
+               public const int BIG_ENDIAN;
+               [CCode (cname = "G_PDP_ENDIAN")]
+               public const int PDP_ENDIAN;
+       }
+
        /* Atomic Operations */
 
        namespace AtomicInt {