Roger Binns wrote:
> [EMAIL PROTECTED] wrote:
> > It is also an error to
> > invoke sqlite3_initialize() more than once.
> 
> That is a pretty nasty restriction to have.  If you link multiple
other
> libraries into your program, each of which also uses SQLite then you'd
> somehow have to arrange that only one of them calls sqlite3_initialize
> which is a serious pain.

I concur: having a required initialization function is not too bad, but
it is more elegant to only require that initialize/cleanup be called in
nested pairs (or just to allow arbitrary numbers of calls to initialize
if cleanup is a no-op).

For my uses of SQLite3 from C++, it is trivial to guarantee that an
initialization function is called prior to any other calls.  It's not
even very hard to add another check to ensure that it's called once
only, but I can see *most* clients having to do the same, which is a
strong argument for doing it in the library (even such an elegantly
minimal library as SQLite3).

-- James


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to