Re: [Vala] Problems retrieving binary data from a sqlite3 database BLOB column



Use unowned arrays to avoid copies:

unowned uint8[] data = (uint8[]) stmt.column_blob(4);
data.length = whatever...
var copied_data = data; // now you can copy the data

We could use unowned uint8[] in the vapi anyway.
Also, we should report an error when trying to copy an array with no known
length.

-- 
www.debian.org - The Universal Operating System


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]