[vala/0.52] glib-2.0: Add RefString since 2.58



commit 36006072ecd54d533378101c5e0adf341258f154
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Thu Nov 1 18:38:02 2018 +0100

    glib-2.0: Add RefString since 2.58
    
    Thanks to Jiří Janoušek
    
    See https://gitlab.gnome.org/GNOME/vala/issues/666
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/723

 vapi/glib-2.0.vapi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 66df0a16e..98d813922 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -5423,6 +5423,22 @@ namespace GLib {
 
        /* Strings */
 
+       [CCode (cprefix = "g_ref_string_", ref_function = "g_ref_string_acquire", unref_function = 
"g_ref_string_release", type_id = "G_TYPE_STRING")]
+       [Version (since = "2.58")]
+       public class RefString {
+               public RefString (string str);
+               public RefString.intern (string str);
+               public RefString.len (string str, ssize_t len);
+
+               public size_t length {
+                       [CCode (cname = "g_ref_string_length")]
+                       get;
+               }
+
+               [CCode (cname = "(const char*)")]
+               public unowned string to_string ();
+       }
+
        [Compact]
        [GIR (name = "String")]
        [CCode (cname = "GString", cprefix = "g_string_", free_function = "g_string_free", type_id = 
"G_TYPE_GSTRING")]


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