MCPcopy Create free account
hub / github.com/GNOME/gjs / gjs_byte_array_get_bytes

Function gjs_byte_array_get_bytes

gjs/byteArray.cpp:189–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189GBytes* gjs_byte_array_get_bytes(JSObject* obj) {
190 bool is_shared_memory;
191 size_t len;
192 uint8_t* data;
193
194 js::GetUint8ArrayLengthAndData(obj, &len, &is_shared_memory, &data);
195 return g_bytes_new(data, len);
196}
197
198GByteArray* gjs_byte_array_get_byte_array(JSObject* obj) {
199 return g_bytes_unref_to_array(gjs_byte_array_get_bytes(obj));

Callers 5

inMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected