[ Version ( since = "2.32" ) ]
public ByteArray.take (owned uint8[] data)
Create byte array containing the data.
The data will be owned by the array and will be freed with g_free, i.e. it could be allocated using strdup.
Do not use it if data.length
is greater than g_maxuint.
ByteArray stores the length of its data in uint,
which may be shorter than size_t.
data |
byte data for the array |
len |
length of |
a new ByteArray |