Re: [Vala] Problems retrieving binary data from a sqlite3 database BLOB column
- From: Luca Bruno <lethalman88 gmail com>
- To: vala-list gnome org
- Subject: Re: [Vala] Problems retrieving binary data from a sqlite3 database BLOB column
- Date: Mon, 27 Jun 2011 09:11:50 +0200
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]