Roger Binns wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 11/22/2010 11:31 AM, Chris Wolf wrote: > >> Is there a way for me to store one or more pointers to data structures >> as user data in a sqlite3 structure (i.e. the "connection")? >> > > Nope. It is also a problem if you want to share a connection between > different libraries. Currently the only way to find out that the connection > is being closed is to register a function or collation with a nonsensical > name and hook the xDelete method. > > There have been requests for my Python library to accept a sqlite3 pointer >
Hmm, if you mean apsw, that's actually one of the things I wanted to do: change the Connection signature to accept an already open database connection as an alternative to always opening a database file. I'm also finding the degree of encapsulation difficult to work with (at least for dynamically loadable extensions, which can't include sqliteInt.h without linking with the whole amalgamation, but then may as well statically link, like your apsw) > made from elsewhere (eg the application) but I can't implement it without > great risk of memory corruption as I can't control what elsewhere does with > the pointer. There are also some data structures that are not reference > counted such as the VFS so you don't know if it is safe to remove or change > at any point. > > Roger > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkzq5dcACgkQmOOfHg372QSBbgCfYDtH6vFpY0eM4UqiCcDg6eCO > AWgAn18QhsYDicO4ZQFZEP0/OUjV53ox > =3KPy > -----END PGP SIGNATURE----- > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

