On 08.01.2017 14:20, Clemens Ladisch wrote:
Kirill Müller wrote:
On 08.01.2017 12:54, Clemens Ladisch wrote:
Kirill Müller wrote:
... there's no portable support for 64-bit integers.
I'm working around this issue by using a struct of size 8
A struct of size 8 does not behave the same as an integer type.

For compiling sqlite.c, I'm using a 64-bit integer type. I'm only
using the struct for compiling C++ modules that include sqlite.h.
This means that you cannot link the C and C++ code together, because
they use different types.
Good point. I was planning to cross fingers that an 8-byte POD struct will align nicely with a 64-bit integer. (Would need to take care about endianness, too.) I'm open to alternatives.

On the C++ side I'll find a suitable way to handle the data.
How exactly do you get the C++ compiler to handle an 8-byte struct the
same as a 64-bit integer (a type which it supposedly does not have)?
I'd use a multiprecision C++ class. My code uses 64-bit integers only for reading and writing column data.


-Kirill

Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to