]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add bindings for GPOINTER_TO_* as from_pointer()
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 5 Mar 2017 11:44:38 +0000 (12:44 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 5 Mar 2017 11:44:38 +0000 (12:44 +0100)
vapi/glib-2.0.vapi

index 428dd0bf0321a178bd3aeabe30f5a70996a03c49..9b57dea78a1cfbaaa6a06cce85a73b1d5f092ed3 100644 (file)
@@ -131,6 +131,8 @@ public struct int {
 
        [CCode (cname = "GINT_TO_POINTER")]
        public void* to_pointer ();
+       [CCode (cname = "GPOINTER_TO_INT")]
+       public static int from_pointer (void* p);
 
        [CCode (cname = "abs", cheader_filename = "stdlib.h")]
        public int abs ();
@@ -171,6 +173,8 @@ public struct uint {
 
        [CCode (cname = "GUINT_TO_POINTER")]
        public void* to_pointer ();
+       [CCode (cname = "GPOINTER_TO_UINT")]
+       public static uint from_pointer (void* p);
 
        [CCode (cname = "GUINT_TO_BE")]
        public uint to_big_endian ();
@@ -317,6 +321,8 @@ public struct size_t {
 
        [CCode (cname = "GSIZE_TO_POINTER")]
        public void* to_pointer ();
+       [CCode (cname = "GPOINTER_TO_SIZE")]
+       public static size_t from_pointer (void* p);
 
        [CCode (cname = "MIN")]
        public static size_t min (size_t a, size_t b);
@@ -375,6 +381,8 @@ public struct uintptr {
 
        [CCode (cname = "GSIZE_TO_POINTER")]
        public void* to_pointer ();
+       [CCode (cname = "GPOINTER_TO_SIZE")]
+       public static uintptr from_pointer (void* p);
 
        [CCode (cname = "MIN")]
        public static uintptr min (uintptr a, uintptr b);