diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-11-01 18:38:02 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-09-01 13:33:17 +0200 |
commit | 60fd1f800b3e2746c95d7503b40a03f5498f0f5d (patch) | |
tree | 229678e0f23e9a50357b130a4862d70d185b1b7d | |
parent | c0121583cee85656862516e689f8b63555a0ff20 (diff) | |
download | vala-60fd1f800b3e2746c95d7503b40a03f5498f0f5d.tar.gz |
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
-rw-r--r-- | vapi/glib-2.0.vapi | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index a86b81df0..71caeaf2c 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -5443,6 +5443,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")] |