Sha256: b90371c7a70a05ad66993b319a6e032dd8c439530996a19f1c5e583bf8e9682b
Contents?: true
Size: 466 Bytes
Versions: 9
Compression:
Stored size: 466 Bytes
Contents
# frozen_string_literal: true GLib.load_class :ByteArray module GLib # Overrides for GByteArray, GLib's automatically growing array of bytes. class ByteArray def to_string data.read_string len end def append(data) bytes = GirFFI::InPointer.from_utf8 data len = data.bytesize self.class.wrap Lib.g_byte_array_append(to_ptr, bytes, len) end def initialize store_pointer(Lib.g_byte_array_new) end end end
Version data entries
9 entries across 9 versions & 1 rubygems