From cd1dc0923fb88a5f2e69a9a134c42a7206247a21 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 3 Feb 2012 10:50:23 -0500 Subject: [PATCH] glib: add .data to StringBuilder To do the same thing as string.data, but without the strlen() (since we already know this from the GString's length field). https://bugzilla.gnome.org/show_bug.cgi?id=669313 --- vapi/glib-2.0.vapi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 45f5640e2..25b228fe3 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -4068,6 +4068,14 @@ namespace GLib { public string str; public ssize_t len; public ssize_t allocated_len; + + public uint8[] data { + get { + unowned uint8[] res = (uint8[]) this.str; + res.length = (int) this.len; + return res; + } + } } /* String Chunks */ -- 2.47.2