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



commit bbb5801c8abf383308433878236373ac13ad7e37
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 6e2a761c8..00153e31c 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -5311,6 +5311,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]