]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0.vapi: Add some more unref/ref functions when using newer GLib
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 25 Mar 2010 15:02:14 +0000 (16:02 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 25 Mar 2010 15:02:14 +0000 (16:02 +0100)
vapi/glib-2.0.vapi

index 3421a5d7b5756d2ce01a41fd6d8d639e60108dd5..e1eba837e6cece23439601be1cd1e1c8809e0935 100644 (file)
@@ -2642,10 +2642,13 @@ namespace GLib {
        }
 
        [Compact]
+#if GLIB_2_22
+       [CCode (ref_function = "g_mapped_file_ref", unref_function = "g_mapped_file_unref")]
+#else
        [CCode (free_function = "g_mapped_file_free")]
+#endif
        public class MappedFile {
                public MappedFile (string filename, bool writable) throws FileError;
-               public void free ();
                public size_t get_length ();
                public char* get_contents ();
        }
@@ -3463,7 +3466,11 @@ namespace GLib {
        /* Pointer Arrays */
 
        [Compact]
+#if GLIB_2_22
+       [CCode (ref_function = "g_ptr_array_ref", unref_function = "g_ptr_array_unref")]
+#else
        [CCode (free_function = "g_ptr_array_free")]
+#endif
        public class PtrArray {
                public PtrArray ();
                [CCode (cname = "g_ptr_array_sized_new")]
@@ -3486,7 +3493,11 @@ namespace GLib {
        /* Byte Arrays */
 
        [Compact]
+#if GLIB_2_22
+       [CCode (cprefix = "g_byte_array_", ref_function = "g_byte_array_ref", unref_function = "g_byte_array_unref")]
+#else
        [CCode (cprefix = "g_byte_array_", free_function = "g_byte_array_free")]
+#endif
        public class ByteArray {
                public ByteArray ();
                [CCode (cname = "g_byte_array_sized_new")]
@@ -3550,6 +3561,11 @@ namespace GLib {
        /* GArray */
 
        [Compact]
+#if GLIB_2_22
+       [CCode (ref_function = "g_array_ref", unref_function = "g_array_unref")]
+#else
+       [CCode (free_function = "g_array_free")]
+#endif
        public class Array<G> {
                [CCode (cname = "len")]
                public uint length;