-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 23/01/16 11:41, Bart Smissaert wrote: > My question is how could I have foreseen this problem, so how could > I have known that using long is no good here?
I am somewhat confused about what you wrote. SQLite provides a C level api. You can ignore the types and put in alternatives. Depending on byte order, calling conventions, what the C types actually mapped to, sizes of types etc it may work when wrong anyway, or you could get seriously messed up problems. IOW you are getting lucky using long instead of int. > Not from the documentation of sqlite3_compileoption_get: > https://www.sqlite.org/c3ref/compileoption_get.html Could you explain all this again? As written you seem to want to know the places where you can ignore the types the C SQLite uses, and substitute others you feel like using instead. The answer is don't do that, if you do do that you'll have an experience anywhere from getting lucky to subtly corrupting things to crashes. > Could I see it from the sqlite3.c source? Should this be documented > somehow better? The function name, argument and return types in C are generally referred to as its prototype. These are usually listed in header files (extension of .h) and if you look in the SQLite distribution you'll find a sqlite3.h that contains them all. However that file is over 400kb long (there are a lot of comments and supporting information). The SQLite C function doc is more accessible and includes the same information: https://www.sqlite.org/c3ref/funclist.html Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlaj6NgACgkQmOOfHg372QTEtgCgxcMpQxsQDEfKqcUkCBS+Mvhw tuAAnRg10CKwOUmJQgvqpPGTwhK5+KbE =BZ6P -----END PGP SIGNATURE-----

