Commit 27099feb authored by Rico Tzschichholz's avatar Rico Tzschichholz

glib-2.0: Make Bytes.slice() use the memory-efficient Bytes.from_bytes()

Fixes GNOME/vala#638
parent 03061275
......@@ -5053,9 +5053,8 @@ namespace GLib {
[CCode (cname = "_vala_g_bytes_slice")]
public GLib.Bytes slice (int start, int end) {
unowned uint8[] data = this.get_data ();
return new GLib.Bytes (data[start:end]);
public GLib.Bytes slice (size_t start, size_t end) {
return new GLib.Bytes.from_bytes (this, start, end - start);
public int length {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment