1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Make the use and function of SQLITE_DYNAMIC clearer. Add assert() statement

to help ensure that SQLITE_DYNAMIC is not misused.

FossilOrigin-Name: ab80f2c3b2f1eea6e35989d3e9b6137b51091754
This commit is contained in:
drh
2012-01-19 16:57:16 +00:00
parent 0541b3d427
commit aa538a581a
4 changed files with 16 additions and 10 deletions

View File

@@ -561,9 +561,13 @@ struct BusyHandler {
/*
** The following value as a destructor means to use sqlite3DbFree().
** This is an internal extension to SQLITE_STATIC and SQLITE_TRANSIENT.
** The sqlite3DbFree() routine requires two parameters instead of the
** one parameter that destructors normally want. So we have to introduce
** this magic value that the code knows to handle differently. Any
** pointer will work here as long as it is distinct from SQLITE_STATIC
** and SQLITE_TRANSIENT.
*/
#define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3DbFree)
#define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize)
/*
** When SQLITE_OMIT_WSD is defined, it means that the target platform does