RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [email protected] Module: sqlite Date: 10-Jul-2010 22:28:46 Branch: HEAD Handle: 2010071020284201 Modified files: sqlite .cvsignore sqlite/src sqlite.h.in sqliteInt.h Log: - sqlite: splint fiddles. Summary: Revision Changes Path 1.10 +3 -0 sqlite/.cvsignore 1.6 +536 -265 sqlite/src/sqlite.h.in 1.6 +6 -0 sqlite/src/sqliteInt.h ____________________________________________________________________________ patch -p0 <<'@@ .' Index: sqlite/.cvsignore ============================================================================ $ cvs diff -u -r1.9 -r1.10 .cvsignore --- sqlite/.cvsignore 10 Jul 2010 16:57:37 -0000 1.9 +++ sqlite/.cvsignore 10 Jul 2010 20:28:42 -0000 1.10 @@ -1,16 +1,19 @@ .libs .target_source Makefile +aclocal.m4 autom4te.cache config.h config.log config.status +configure keywordhash.h lemon lempar.c libsqlite3.la libtclsqlite3.la libtool +ltmain.sh mkkeywordhash opcodes.c opcodes.h @@ . patch -p0 <<'@@ .' Index: sqlite/src/sqlite.h.in ============================================================================ $ cvs diff -u -r1.5 -r1.6 sqlite.h.in --- sqlite/src/sqlite.h.in 10 Jul 2010 16:34:07 -0000 1.5 +++ sqlite/src/sqlite.h.in 10 Jul 2010 20:28:43 -0000 1.6 @@ -136,10 +136,14 @@ ** ** See also: [sqlite_version()] and [sqlite_source_id()]. */ +/*...@unchecked@*/ SQLITE_EXTERN const char sqlite3_version[]; -const char *sqlite3_libversion(void); -const char *sqlite3_sourceid(void); -int sqlite3_libversion_number(void); +const char *sqlite3_libversion(void) + /*...@*/; +const char *sqlite3_sourceid(void) + /*...@*/; +int sqlite3_libversion_number(void) + /*...@*/; #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS /* @@ -164,8 +168,10 @@ ** See also: SQL functions [sqlite_compileoption_used()] and ** [sqlite_compileoption_get()] and the [compile_options pragma]. */ -int sqlite3_compileoption_used(const char *zOptName); -const char *sqlite3_compileoption_get(int N); +int sqlite3_compileoption_used(const char *zOptName) + /*...@*/; +const char *sqlite3_compileoption_get(int N) + /*...@*/; #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ /* @@ -204,7 +210,8 @@ ** ** See the [threading mode] documentation for additional information. */ -int sqlite3_threadsafe(void); +int sqlite3_threadsafe(void) + /*...@*/; /* ** CAPI3REF: Database Connection Handle @@ -282,14 +289,16 @@ ** ^Calling sqlite3_close() with a NULL pointer argument is a ** harmless no-op. */ -int sqlite3_close(sqlite3 *); +int sqlite3_close(sqlite3 *db) + /*...@modifies db @*/; /* ** The type for a callback function. ** This is legacy and deprecated. It is included for historical ** compatibility and is not documented. */ -typedef int (*sqlite3_callback)(void*,int,char**, char**); +typedef int (*sqlite3_callback)(void*,int,char**, char**) + /*...@*/; /* ** CAPI3REF: One-Step Query Execution Interface @@ -353,12 +362,16 @@ ** </ul> */ int sqlite3_exec( - sqlite3*, /* An open database */ + sqlite3* db, /* An open database */ const char *sql, /* SQL to be evaluated */ +/*...@null@*/ int (*callback)(void*,int,char**,char**), /* Callback function */ +/*...@null@*/ void *, /* 1st argument to callback */ +/*...@null@*/ char **errmsg /* Error msg written here */ -); +) + /*...@modifies db, *errmsg @*/; /* ** CAPI3REF: Result Codes @@ -641,18 +654,30 @@ typedef struct sqlite3_io_methods sqlite3_io_methods; struct sqlite3_io_methods { int iVersion; - int (*xClose)(sqlite3_file*); - int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); - int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); - int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); - int (*xSync)(sqlite3_file*, int flags); - int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); - int (*xLock)(sqlite3_file*, int); - int (*xUnlock)(sqlite3_file*, int); - int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); - int (*xFileControl)(sqlite3_file*, int op, void *pArg); - int (*xSectorSize)(sqlite3_file*); - int (*xDeviceCharacteristics)(sqlite3_file*); + int (*xClose)(sqlite3_file*) + /*...@*/; + int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst) + /*...@*/; + int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst) + /*...@*/; + int (*xTruncate)(sqlite3_file*, sqlite3_int64 size) + /*...@*/; + int (*xSync)(sqlite3_file*, int flags) + /*...@*/; + int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize) + /*...@*/; + int (*xLock)(sqlite3_file*, int) + /*...@*/; + int (*xUnlock)(sqlite3_file*, int) + /*...@*/; + int (*xCheckReservedLock)(sqlite3_file*, int *pResOut) + /*...@*/; + int (*xFileControl)(sqlite3_file*, int op, void *pArg) + /*...@*/; + int (*xSectorSize)(sqlite3_file*) + /*...@*/; + int (*xDeviceCharacteristics)(sqlite3_file*) + /*...@*/; /* Additional methods may be added in future releases */ }; @@ -826,18 +851,30 @@ const char *zName; /* Name of this virtual file system */ void *pAppData; /* Pointer to application-specific data */ int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, - int flags, int *pOutFlags); - int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); - int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); - int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); - void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); - void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); - void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); - void (*xDlClose)(sqlite3_vfs*, void*); - int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); - int (*xSleep)(sqlite3_vfs*, int microseconds); - int (*xCurrentTime)(sqlite3_vfs*, double*); - int (*xGetLastError)(sqlite3_vfs*, int, char *); + int flags, int *pOutFlags) + /*...@*/; + int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir) + /*...@*/; + int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut) + /*...@*/; + int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut) + /*...@*/; + void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename) + /*...@*/; + void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg) + /*...@*/; + void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void) + /*...@*/; + void (*xDlClose)(sqlite3_vfs*, void*) + /*...@*/; + int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut) + /*...@*/; + int (*xSleep)(sqlite3_vfs*, int microseconds) + /*...@*/; + int (*xCurrentTime)(sqlite3_vfs*, double*) + /*...@*/; + int (*xGetLastError)(sqlite3_vfs*, int, char *) + /*...@*/; /* New fields may be appended in figure versions. The iVersion ** value will increment whenever this happens. */ }; @@ -934,10 +971,14 @@ ** must return [SQLITE_OK] on success and some other [error code] upon ** failure. */ -int sqlite3_initialize(void); -int sqlite3_shutdown(void); -int sqlite3_os_init(void); -int sqlite3_os_end(void); +int sqlite3_initialize(void) + /*...@*/; +int sqlite3_shutdown(void) + /*...@*/; +int sqlite3_os_init(void) + /*...@*/; +int sqlite3_os_end(void) + /*...@*/; /* ** CAPI3REF: Configuring The SQLite Library @@ -968,7 +1009,8 @@ ** ^If the option is unknown or SQLite is unable to set the option ** then this routine returns a non-zero [error code]. */ -SQLITE_EXPERIMENTAL int sqlite3_config(int, ...); +SQLITE_EXPERIMENTAL int sqlite3_config(int, ...) + /*...@*/; /* ** CAPI3REF: Configure database connections @@ -992,7 +1034,8 @@ ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if ** the call is considered successful. */ -SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...); +SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3* db, int op, ...) + /*...@*/; /* ** CAPI3REF: Memory Allocation Routines @@ -1326,7 +1369,8 @@ ** [extended result codes] feature of SQLite. ^The extended result ** codes are disabled by default for historical compatibility. */ -int sqlite3_extended_result_codes(sqlite3*, int onoff); +int sqlite3_extended_result_codes(sqlite3* db, int onoff) + /*...@modifies db @*/; /* ** CAPI3REF: Last Insert Rowid @@ -1371,7 +1415,8 @@ ** unpredictable and might not equal either the old or the new ** last insert [rowid]. */ -sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); +sqlite3_int64 sqlite3_last_insert_rowid(sqlite3* db) + /*...@*/; /* ** CAPI3REF: Count The Number Of Rows Modified @@ -1425,7 +1470,8 @@ ** while [sqlite3_changes()] is running then the value returned ** is unpredictable and not meaningful. */ -int sqlite3_changes(sqlite3*); +int sqlite3_changes(sqlite3* db) + /*...@*/; /* ** CAPI3REF: Total Number Of Rows Modified @@ -1451,7 +1497,8 @@ ** while [sqlite3_total_changes()] is running then the value ** returned is unpredictable and not meaningful. */ -int sqlite3_total_changes(sqlite3*); +int sqlite3_total_changes(sqlite3* db) + /*...@*/; /* ** CAPI3REF: Interrupt A Long-Running Query @@ -1490,7 +1537,8 @@ ** If the database connection closes while [sqlite3_interrupt()] ** is running then bad things will likely happen. */ -void sqlite3_interrupt(sqlite3*); +void sqlite3_interrupt(sqlite3* db) + /*...@modifies db @*/; /* ** CAPI3REF: Determine If An SQL Statement Is Complete @@ -1525,8 +1573,10 @@ ** The input to [sqlite3_complete16()] must be a zero-terminated ** UTF-16 string in native byte order. */ -int sqlite3_complete(const char *sql); -int sqlite3_complete16(const void *sql); +int sqlite3_complete(const char *sql) + /*...@*/; +int sqlite3_complete16(const void *sql) + /*...@*/; /* ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors @@ -1592,7 +1642,8 @@ ** A busy handler must not close the database connection ** or [prepared statement] that invoked the busy handler. */ -int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); +int sqlite3_busy_handler(sqlite3* db, int(*)(void*,int), void*) + /*...@modifies db @*/; /* ** CAPI3REF: Set A Busy Timeout @@ -1612,7 +1663,8 @@ ** was defined (using [sqlite3_busy_handler()]) prior to calling ** this routine, that other busy handler is cleared.)^ */ -int sqlite3_busy_timeout(sqlite3*, int ms); +int sqlite3_busy_timeout(sqlite3* db, int ms) + /*...@modifies db @*/; /* ** CAPI3REF: Convenience Routines For Running Queries @@ -1690,8 +1742,10 @@ int *pnRow, /* Number of result rows written here */ int *pnColumn, /* Number of result columns written here */ char **pzErrmsg /* Error msg written here */ -); -void sqlite3_free_table(char **result); +) + /*...@modifies db, *pazResult, *pnRow, *pnColumn, *pzErrmsg @*/; +void sqlite3_free_table(/*...@only@*/char **result) + /*...@modifies *result @*/; /* ** CAPI3REF: Formatted String Printing Functions @@ -1785,9 +1839,12 @@ ** addition that after the string has been read and copied into ** the result, [sqlite3_free()] is called on the input string.)^ */ -char *sqlite3_mprintf(const char*,...); -char *sqlite3_vmprintf(const char*, va_list); -char *sqlite3_snprintf(int,char*,const char*, ...); +char *sqlite3_mprintf(const char*,...) + /*...@*/; +char *sqlite3_vmprintf(const char*, va_list) + /*...@*/; +char *sqlite3_snprintf(int,char*,const char*, ...) + /*...@*/; /* ** CAPI3REF: Memory Allocation Subsystem @@ -1857,9 +1914,12 @@ ** a block of memory after it has been released using ** [sqlite3_free()] or [sqlite3_realloc()]. */ -void *sqlite3_malloc(int); -void *sqlite3_realloc(void*, int); -void sqlite3_free(void*); +void *sqlite3_malloc(int) + /*...@*/; +void *sqlite3_realloc(void*, int) + /*...@*/; +void sqlite3_free(void*) + /*...@*/; /* ** CAPI3REF: Memory Allocator Statistics @@ -1884,8 +1944,10 @@ ** by [sqlite3_memory_highwater(1)] is the high-water mark ** prior to the reset. */ -sqlite3_int64 sqlite3_memory_used(void); -sqlite3_int64 sqlite3_memory_highwater(int resetFlag); +sqlite3_int64 sqlite3_memory_used(void) + /*...@*/; +sqlite3_int64 sqlite3_memory_highwater(int resetFlag) + /*...@*/; /* ** CAPI3REF: Pseudo-Random Number Generator @@ -1905,7 +1967,8 @@ ** internally and without recourse to the [sqlite3_vfs] xRandomness ** method. */ -void sqlite3_randomness(int N, void *P); +void sqlite3_randomness(int N, void *P) + /*...@*/; /* ** CAPI3REF: Compile-Time Authorization Callbacks @@ -1988,10 +2051,11 @@ ** sqlite3_prepare_v2() to reprepare a statement after a schema change. */ int sqlite3_set_authorizer( - sqlite3*, + sqlite3* db, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pUserData -); +) + /*...@modifies db @*/; /* ** CAPI3REF: Authorizer Return Codes @@ -2079,9 +2143,11 @@ ** the original statement text and an estimate of wall-clock time ** of how long that statement took to run. */ -SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); -SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*, - void(*xProfile)(void*,const char*,sqlite3_uint64), void*); +SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3* db, void(*xTrace)(void*,const char*), void*) + /*...@modifies db @*/; +SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3* db, + void(*xProfile)(void*,const char*,sqlite3_uint64), void*) + /*...@modifies db @*/; /* ** CAPI3REF: Query Progress Callbacks @@ -2102,7 +2168,8 @@ ** database connections for the meaning of "modify" in this paragraph. ** */ -void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); +void sqlite3_progress_handler(sqlite3* db, int, int(*)(void*), void*) + /*...@modifies db @*/; /* ** CAPI3REF: Opening A New Database Connection @@ -2196,17 +2263,20 @@ int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db handle */ -); +) + /*...@modifies *ppDb @*/; int sqlite3_open16( const void *filename, /* Database filename (UTF-16) */ sqlite3 **ppDb /* OUT: SQLite db handle */ -); +) + /*...@modifies *ppDb @*/; int sqlite3_open_v2( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb, /* OUT: SQLite db handle */ int flags, /* Flags */ const char *zVfs /* Name of VFS module to use */ -); +) + /*...@modifies *ppDb @*/; /* ** CAPI3REF: Error Codes And Messages @@ -2241,10 +2311,14 @@ ** was invoked incorrectly by the application. In that case, the ** error code and message may or may not be set. */ -int sqlite3_errcode(sqlite3 *db); -int sqlite3_extended_errcode(sqlite3 *db); -const char *sqlite3_errmsg(sqlite3*); -const void *sqlite3_errmsg16(sqlite3*); +int sqlite3_errcode(sqlite3 *db) + /*...@modifies db @*/; +int sqlite3_extended_errcode(sqlite3 *db) + /*...@modifies db @*/; +const char *sqlite3_errmsg(sqlite3* db) + /*...@modifies db @*/; +const void *sqlite3_errmsg16(sqlite3* db) + /*...@modifies db @*/; /* ** CAPI3REF: SQL Statement Object @@ -2306,7 +2380,8 @@ ** ** New run-time limit categories may be added in future releases. */ -int sqlite3_limit(sqlite3*, int id, int newVal); +int sqlite3_limit(sqlite3* db, int id, int newVal) + /*...@modifies db @*/; /* ** CAPI3REF: Run-Time Limit Categories @@ -2453,30 +2528,42 @@ sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ +/*...@out@*/ /*...@null@*/ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ +/*...@out@*/ /*...@null@*/ const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); +) + /*...@modifies db, *ppStmt, *pzTail @*/; int sqlite3_prepare_v2( sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ +/*...@out@*/ /*...@null@*/ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ +/*...@out@*/ /*...@null@*/ const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); +) + /*...@modifies db, *ppStmt, *pzTail @*/; int sqlite3_prepare16( sqlite3 *db, /* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ int nByte, /* Maximum length of zSql in bytes. */ +/*...@out@*/ /*...@null@*/ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ +/*...@out@*/ /*...@null@*/ const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); +) + /*...@modifies db, *ppStmt, *pzTail @*/; int sqlite3_prepare16_v2( sqlite3 *db, /* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ int nByte, /* Maximum length of zSql in bytes. */ +/*...@out@*/ /*...@null@*/ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ +/*...@out@*/ /*...@null@*/ const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); +) + /*...@modifies db, *ppStmt, *pzTail @*/; /* ** CAPI3REF: Retrieving Statement SQL @@ -2485,7 +2572,8 @@ ** SQL text used to create a [prepared statement] if that statement was ** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. */ -const char *sqlite3_sql(sqlite3_stmt *pStmt); +const char *sqlite3_sql(sqlite3_stmt *pStmt) + /*...@*/; /* ** CAPI3REF: Dynamically Typed Value Object @@ -2619,15 +2707,24 @@ ** See also: [sqlite3_bind_parameter_count()], ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. */ -int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); -int sqlite3_bind_double(sqlite3_stmt*, int, double); -int sqlite3_bind_int(sqlite3_stmt*, int, int); -int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); -int sqlite3_bind_null(sqlite3_stmt*, int); -int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*)); -int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); -int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); -int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); +int sqlite3_bind_blob(sqlite3_stmt* pStmt, int, const void*, int n, void(*)(void*)) + /*...@modifies pStmt @*/; +int sqlite3_bind_double(sqlite3_stmt* pStmt, int, double) + /*...@modifies pStmt @*/; +int sqlite3_bind_int(sqlite3_stmt* pStmt, int, int) + /*...@modifies pStmt @*/; +int sqlite3_bind_int64(sqlite3_stmt* pStmt, int, sqlite3_int64) + /*...@modifies pStmt @*/; +int sqlite3_bind_null(sqlite3_stmt* pStmt, int) + /*...@modifies pStmt @*/; +int sqlite3_bind_text(sqlite3_stmt* pStmt, int, const char*, int n, void(*)(void*)) + /*...@modifies pStmt @*/; +int sqlite3_bind_text16(sqlite3_stmt* pStmt, int, const void*, int, void(*)(void*)) + /*...@modifies pStmt @*/; +int sqlite3_bind_value(sqlite3_stmt* pStmt, int, const sqlite3_value*) + /*...@modifies pStmt @*/; +int sqlite3_bind_zeroblob(sqlite3_stmt* pStmt, int, int n) + /*...@modifies pStmt @*/; /* ** CAPI3REF: Number Of SQL Parameters @@ -2647,7 +2744,8 @@ ** [sqlite3_bind_parameter_name()], and ** [sqlite3_bind_parameter_index()]. */ -int sqlite3_bind_parameter_count(sqlite3_stmt*); +int sqlite3_bind_parameter_count(sqlite3_stmt* pStmt) + /*...@*/; /* ** CAPI3REF: Name Of A Host Parameter @@ -2674,7 +2772,8 @@ ** [sqlite3_bind_parameter_count()], and ** [sqlite3_bind_parameter_index()]. */ -const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); +const char *sqlite3_bind_parameter_name(sqlite3_stmt* pStmt, int) + /*...@modifies pStmt @*/; /* ** CAPI3REF: Index Of A Parameter With A Given Name @@ -2690,7 +2789,8 @@ ** [sqlite3_bind_parameter_count()], and ** [sqlite3_bind_parameter_index()]. */ -int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); +int sqlite3_bind_parameter_index(sqlite3_stmt* pStmt, const char *zName) + /*...@modifies pStmt @*/; /* ** CAPI3REF: Reset All Bindings On A Prepared Statement @@ -2699,7 +2799,8 @@ ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. ** ^Use this routine to reset all host parameters to NULL. */ -int sqlite3_clear_bindings(sqlite3_stmt*); +int sqlite3_clear_bindings(sqlite3_stmt* pStmt) + /*...@modifies pStmt @*/; /* ** CAPI3REF: Number Of Columns In A Result Set @@ -2708,7 +2809,8 @@ ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL ** statement that does not return data (for example an [UPDATE]). */ -int sqlite3_column_count(sqlite3_stmt *pStmt); +int sqlite3_column_count(sqlite3_stmt *pStmt) + /*...@*/; /* ** CAPI3REF: Column Names In A Result Set @@ -2734,8 +2836,10 @@ ** then the name of the column is unspecified and may change from ** one release of SQLite to the next. */ -const char *sqlite3_column_name(sqlite3_stmt*, int N); -const void *sqlite3_column_name16(sqlite3_stmt*, int N); +const char *sqlite3_column_name(sqlite3_stmt* pStmt, int N) + /*...@*/; +const void *sqlite3_column_name16(sqlite3_stmt* pStmt, int N) + /*...@*/; /* ** CAPI3REF: Source Of Data In A Query Result @@ -2780,12 +2884,18 @@ ** for the same [prepared statement] and result column ** at the same time then the results are undefined. */ -const char *sqlite3_column_database_name(sqlite3_stmt*,int); -const void *sqlite3_column_database_name16(sqlite3_stmt*,int); -const char *sqlite3_column_table_name(sqlite3_stmt*,int); -const void *sqlite3_column_table_name16(sqlite3_stmt*,int); -const char *sqlite3_column_origin_name(sqlite3_stmt*,int); -const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); +const char *sqlite3_column_database_name(sqlite3_stmt* pStmt,int) + /*...@*/; +const void *sqlite3_column_database_name16(sqlite3_stmt* pStmt,int) + /*...@*/; +const char *sqlite3_column_table_name(sqlite3_stmt* pStmt,int) + /*...@*/; +const void *sqlite3_column_table_name16(sqlite3_stmt* pStmt,int) + /*...@*/; +const char *sqlite3_column_origin_name(sqlite3_stmt* pStmt,int) + /*...@*/; +const void *sqlite3_column_origin_name16(sqlite3_stmt* pStmt,int) + /*...@*/; /* ** CAPI3REF: Declared Datatype Of A Query Result @@ -2816,8 +2926,10 @@ ** is associated with individual values, not with the containers ** used to hold those values. */ -const char *sqlite3_column_decltype(sqlite3_stmt*,int); -const void *sqlite3_column_decltype16(sqlite3_stmt*,int); +const char *sqlite3_column_decltype(sqlite3_stmt* pStmt,int) + /*...@*/; +const void *sqlite3_column_decltype16(sqlite3_stmt* pStmt,int) + /*...@*/; /* ** CAPI3REF: Evaluate An SQL Statement @@ -2884,7 +2996,8 @@ ** then the more specific [error codes] are returned directly ** by sqlite3_step(). The use of the "v2" interface is recommended. */ -int sqlite3_step(sqlite3_stmt*); +int sqlite3_step(sqlite3_stmt* pStmt) + /*...@modifies pStmt @*/; /* ** CAPI3REF: Number of columns in a result set @@ -2892,7 +3005,8 @@ ** ^The sqlite3_data_count(P) the number of columns in the ** of the result set of [prepared statement] P. */ -int sqlite3_data_count(sqlite3_stmt *pStmt); +int sqlite3_data_count(sqlite3_stmt *pStmt) + /*...@*/; /* ** CAPI3REF: Fundamental Datatypes @@ -3080,16 +3194,26 @@ ** pointer. Subsequent calls to [sqlite3_errcode()] will return ** [SQLITE_NOMEM].)^ */ -const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); -int sqlite3_column_bytes(sqlite3_stmt*, int iCol); -int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); -double sqlite3_column_double(sqlite3_stmt*, int iCol); -int sqlite3_column_int(sqlite3_stmt*, int iCol); -sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); -const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); -const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); -int sqlite3_column_type(sqlite3_stmt*, int iCol); -sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); +const void *sqlite3_column_blob(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +int sqlite3_column_bytes(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +int sqlite3_column_bytes16(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +double sqlite3_column_double(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +int sqlite3_column_int(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +sqlite3_int64 sqlite3_column_int64(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +const unsigned char *sqlite3_column_text(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +const void *sqlite3_column_text16(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +int sqlite3_column_type(sqlite3_stmt* pStmt, int iCol) + /*...@*/; +sqlite3_value *sqlite3_column_value(sqlite3_stmt* pStmt, int iCol) + /*...@*/; /* ** CAPI3REF: Destroy A Prepared Statement Object @@ -3107,7 +3231,8 @@ ** depending on the circumstances, and the ** [error code] returned will be [SQLITE_ABORT]. */ -int sqlite3_finalize(sqlite3_stmt *pStmt); +int sqlite3_finalize(sqlite3_stmt *pStmt) + /*...@modifies pStmt @*/; /* ** CAPI3REF: Reset A Prepared Statement Object @@ -3133,7 +3258,8 @@ ** ^The [sqlite3_reset(S)] interface does not change the values ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. */ -int sqlite3_reset(sqlite3_stmt *pStmt); +int sqlite3_reset(sqlite3_stmt *pStmt) + /*...@modifies pStmt @*/; /* ** CAPI3REF: Create Or Redefine SQL Functions @@ -3224,7 +3350,8 @@ void (*xFunc)(sqlite3_context*,int,sqlite3_value**), void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*) -); +) + /*...@modifies db @*/; int sqlite3_create_function16( sqlite3 *db, const void *zFunctionName, @@ -3234,7 +3361,8 @@ void (*xFunc)(sqlite3_context*,int,sqlite3_value**), void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*) -); +) + /*...@modifies db @*/; /* ** CAPI3REF: Text Encodings @@ -3260,12 +3388,18 @@ ** using these functions, we are not going to tell you what they do. */ #ifndef SQLITE_OMIT_DEPRECATED -SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); -SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); -SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); -SQLITE_DEPRECATED int sqlite3_global_recover(void); -SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); -SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64); +SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*) + /*...@*/; +SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*) + /*...@*/; +SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt* pStmt, sqlite3_stmt*) + /*...@*/; +SQLITE_DEPRECATED int sqlite3_global_recover(void) + /*...@*/; +SQLITE_DEPRECATED void sqlite3_thread_cleanup(void) + /*...@*/; +SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64) + /*...@*/; #endif /* @@ -3313,18 +3447,30 @@ ** These routines must be called from the same thread as ** the SQL function that supplied the [sqlite3_value*] parameters. */ -const void *sqlite3_value_blob(sqlite3_value*); -int sqlite3_value_bytes(sqlite3_value*); -int sqlite3_value_bytes16(sqlite3_value*); -double sqlite3_value_double(sqlite3_value*); -int sqlite3_value_int(sqlite3_value*); -sqlite3_int64 sqlite3_value_int64(sqlite3_value*); -const unsigned char *sqlite3_value_text(sqlite3_value*); -const void *sqlite3_value_text16(sqlite3_value*); -const void *sqlite3_value_text16le(sqlite3_value*); -const void *sqlite3_value_text16be(sqlite3_value*); -int sqlite3_value_type(sqlite3_value*); -int sqlite3_value_numeric_type(sqlite3_value*); +const void *sqlite3_value_blob(sqlite3_value* pVal) + /*...@modifies pVal @*/; +int sqlite3_value_bytes(sqlite3_value* pVal) + /*...@modifies pVal @*/; +int sqlite3_value_bytes16(sqlite3_value* pVal) + /*...@modifies pVal @*/; +double sqlite3_value_double(sqlite3_value* pVal) + /*...@modifies pVal @*/; +int sqlite3_value_int(sqlite3_value* pVal) + /*...@modifies pVal @*/; +sqlite3_int64 sqlite3_value_int64(sqlite3_value* pVal) + /*...@modifies pVal @*/; +const unsigned char *sqlite3_value_text(sqlite3_value* pVal) + /*...@modifies pVal @*/; +const void *sqlite3_value_text16(sqlite3_value* pVal) + /*...@modifies pVal @*/; +const void *sqlite3_value_text16le(sqlite3_value* pVal) + /*...@modifies pVal @*/; +const void *sqlite3_value_text16be(sqlite3_value* pVal) + /*...@modifies pVal @*/; +int sqlite3_value_type(sqlite3_value* pVal) + /*...@modifies pVal @*/; +int sqlite3_value_numeric_type(sqlite3_value* pVal) + /*...@modifies pVal @*/; /* ** CAPI3REF: Obtain Aggregate Function Context @@ -3365,7 +3511,8 @@ ** This routine must be called from the same thread in which ** the aggregate SQL function is running. */ -void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); +void *sqlite3_aggregate_context(sqlite3_context* pCtx, int nBytes) + /*...@modifies pCtx @*/; /* ** CAPI3REF: User Data For Functions @@ -3379,7 +3526,8 @@ ** This routine must be called from the same thread in which ** the application-defined function is running. */ -void *sqlite3_user_data(sqlite3_context*); +void *sqlite3_user_data(sqlite3_context*) + /*...@*/; /* ** CAPI3REF: Database Connection For Functions @@ -3390,7 +3538,8 @@ ** and [sqlite3_create_function16()] routines that originally ** registered the application defined function. */ -sqlite3 *sqlite3_context_db_handle(sqlite3_context*); +sqlite3 *sqlite3_context_db_handle(sqlite3_context*) + /*...@*/; /* ** CAPI3REF: Function Auxiliary Data @@ -3434,8 +3583,10 @@ ** These routines must be called from the same thread in which ** the SQL function is running. */ -void *sqlite3_get_auxdata(sqlite3_context*, int N); -void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); +void *sqlite3_get_auxdata(sqlite3_context* pCtx, int N) + /*...@*/; +void sqlite3_set_auxdata(sqlite3_context* pCtx, int N, void*, void (*)(void*)) + /*...@modifies pCtx @*/; /* @@ -3452,7 +3603,8 @@ ** The typedef is necessary to work around problems in certain ** C++ compilers. See ticket #2191. */ -typedef void (*sqlite3_destructor_type)(void*); +typedef void (*sqlite3_destructor_type)(void*) + /*...@*/; #define SQLITE_STATIC ((sqlite3_destructor_type)0) #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) @@ -3561,22 +3713,38 @@ ** than the one containing the application-defined function that received ** the [sqlite3_context] pointer, the results are undefined. */ -void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); -void sqlite3_result_double(sqlite3_context*, double); -void sqlite3_result_error(sqlite3_context*, const char*, int); -void sqlite3_result_error16(sqlite3_context*, const void*, int); -void sqlite3_result_error_toobig(sqlite3_context*); -void sqlite3_result_error_nomem(sqlite3_context*); -void sqlite3_result_error_code(sqlite3_context*, int); -void sqlite3_result_int(sqlite3_context*, int); -void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); -void sqlite3_result_null(sqlite3_context*); -void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); -void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); -void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); -void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); -void sqlite3_result_value(sqlite3_context*, sqlite3_value*); -void sqlite3_result_zeroblob(sqlite3_context*, int n); +void sqlite3_result_blob(sqlite3_context* pCtx, const void*, int, void(*)(void*)) + /*...@modifies pCtx @*/; +void sqlite3_result_double(sqlite3_context* pCtx, double) + /*...@modifies pCtx @*/; +void sqlite3_result_error(sqlite3_context* pCtx, const char*, int) + /*...@modifies pCtx @*/; +void sqlite3_result_error16(sqlite3_context* pCtx, const void*, int) + /*...@modifies pCtx @*/; +void sqlite3_result_error_toobig(sqlite3_context* pCtx) + /*...@modifies pCtx @*/; +void sqlite3_result_error_nomem(sqlite3_context* pCtx) + /*...@modifies pCtx @*/; +void sqlite3_result_error_code(sqlite3_context* pCtx, int) + /*...@modifies pCtx @*/; +void sqlite3_result_int(sqlite3_context* pCtx, int) + /*...@modifies pCtx @*/; +void sqlite3_result_int64(sqlite3_context* pCtx, sqlite3_int64) + /*...@modifies pCtx @*/; +void sqlite3_result_null(sqlite3_context* pCtx) + /*...@modifies pCtx @*/; +void sqlite3_result_text(sqlite3_context* pCtx, const char*, int, void(*)(void*)) + /*...@modifies pCtx @*/; +void sqlite3_result_text16(sqlite3_context* pCtx, const void*, int, void(*)(void*)) + /*...@modifies pCtx @*/; +void sqlite3_result_text16le(sqlite3_context* pCtx, const void*, int,void(*)(void*)) + /*...@modifies pCtx @*/; +void sqlite3_result_text16be(sqlite3_context* pCtx, const void*, int,void(*)(void*)) + /*...@modifies pCtx @*/; +void sqlite3_result_value(sqlite3_context* pCtx, sqlite3_value*) + /*...@modifies pCtx @*/; +void sqlite3_result_zeroblob(sqlite3_context* pCtx, int n) + /*...@modifies pCtx @*/; /* ** CAPI3REF: Define New Collating Sequences @@ -3625,27 +3793,30 @@ ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. */ int sqlite3_create_collation( - sqlite3*, + sqlite3* db, const char *zName, int eTextRep, void*, int(*xCompare)(void*,int,const void*,int,const void*) -); +) + /*...@*/; int sqlite3_create_collation_v2( - sqlite3*, + sqlite3* db, const char *zName, int eTextRep, void*, int(*xCompare)(void*,int,const void*,int,const void*), void(*xDestroy)(void*) -); +) + /*...@*/; int sqlite3_create_collation16( - sqlite3*, + sqlite3* db, const void *zName, int eTextRep, void*, int(*xCompare)(void*,int,const void*,int,const void*) -); +) + /*...@*/; /* ** CAPI3REF: Collation Needed Callbacks @@ -3674,15 +3845,17 @@ ** [sqlite3_create_collation_v2()]. */ int sqlite3_collation_needed( - sqlite3*, + sqlite3* db, void*, - void(*)(void*,sqlite3*,int eTextRep,const char*) -); + void(*)(void*,sqlite3* db,int eTextRep,const char*) +) + /*...@modifies db @*/; int sqlite3_collation_needed16( - sqlite3*, + sqlite3* db, void*, - void(*)(void*,sqlite3*,int eTextRep,const void*) -); + void(*)(void*,sqlite3* db,int eTextRep,const void*) +) + /*...@modifies db @*/; #if SQLITE_HAS_CODEC /* @@ -3695,7 +3868,8 @@ int sqlite3_key( sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The key */ -); +) + /*...@*/; /* ** Change the key on an open database. If the current database is not @@ -3708,7 +3882,8 @@ int sqlite3_rekey( sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The new key */ -); +) + /*...@*/; /* ** Specify the activation key for a SEE database. Unless @@ -3716,7 +3891,8 @@ */ void sqlite3_activate_see( const char *zPassPhrase /* Activation phrase */ -); +) + /*...@*/; #endif #ifdef SQLITE_ENABLE_CEROD @@ -3726,7 +3902,8 @@ */ void sqlite3_activate_cerod( const char *zPassPhrase /* Activation phrase */ -); +) + /*...@*/; #endif /* @@ -3743,7 +3920,8 @@ ** ^SQLite implements this interface by calling the xSleep() ** method of the default [sqlite3_vfs] object. */ -int sqlite3_sleep(int); +int sqlite3_sleep(int) + /*...@*/; /* ** CAPI3REF: Name Of The Folder Holding Temporary Files @@ -3774,6 +3952,7 @@ ** made NULL or made to point to memory obtained from [sqlite3_malloc] ** or else the use of the [temp_store_directory pragma] should be avoided. */ +/*...@null@*/ SQLITE_EXTERN char *sqlite3_temp_directory; /* @@ -3797,7 +3976,8 @@ ** connection while this routine is running, then the return value ** is undefined. */ -int sqlite3_get_autocommit(sqlite3*); +int sqlite3_get_autocommit(sqlite3* db) + /*...@*/; /* ** CAPI3REF: Find The Database Handle Of A Prepared Statement @@ -3809,7 +3989,8 @@ ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to ** create the statement in the first place. */ -sqlite3 *sqlite3_db_handle(sqlite3_stmt*); +sqlite3 *sqlite3_db_handle(sqlite3_stmt* pStmt) + /*...@*/; /* ** CAPI3REF: Find the next prepared statement @@ -3824,7 +4005,8 @@ ** [sqlite3_next_stmt(D,S)] must refer to an open database ** connection and in particular must not be a NULL pointer. */ -sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); +sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt) + /*...@*/; /* ** CAPI3REF: Commit And Rollback Notification Callbacks @@ -3872,8 +4054,10 @@ ** ** See also the [sqlite3_update_hook()] interface. */ -void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); -void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); +void *sqlite3_commit_hook(sqlite3* db, int(*)(void*), void*) + /*...@modifies db @*/; +void *sqlite3_rollback_hook(sqlite3* db, void(*)(void *), void*) + /*...@modifies db @*/; /* ** CAPI3REF: Data Change Notification Callbacks @@ -3922,10 +4106,11 @@ ** interfaces. */ void *sqlite3_update_hook( - sqlite3*, + sqlite3* db, void(*)(void *,int ,char const *,char const *,sqlite3_int64), void* -); +) + /*...@modifies db @*/; /* ** CAPI3REF: Enable Or Disable Shared Pager Cache @@ -3954,7 +4139,8 @@ ** ** See Also: [SQLite Shared-Cache Mode] */ -int sqlite3_enable_shared_cache(int); +int sqlite3_enable_shared_cache(int) + /*...@*/; /* ** CAPI3REF: Attempt To Free Heap Memory @@ -3966,7 +4152,8 @@ ** ^sqlite3_release_memory() returns the number of bytes actually freed, ** which might be more or less than the amount requested. */ -int sqlite3_release_memory(int); +int sqlite3_release_memory(int) + /*...@*/; /* ** CAPI3REF: Impose A Limit On Heap Size @@ -3998,7 +4185,8 @@ ** version 3.5.0 there is no mechanism for limiting the heap usage for ** individual threads. */ -void sqlite3_soft_heap_limit(int); +void sqlite3_soft_heap_limit(int) + /*...@*/; /* ** CAPI3REF: Extract Metadata About A Column Of A Table @@ -4067,12 +4255,18 @@ const char *zDbName, /* Database name or NULL */ const char *zTableName, /* Table name */ const char *zColumnName, /* Column name */ +/*...@out@*/ char const **pzDataType, /* OUTPUT: Declared data type */ +/*...@out@*/ char const **pzCollSeq, /* OUTPUT: Collation sequence name */ +/*...@out@*/ int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */ +/*...@out@*/ int *pPrimaryKey, /* OUTPUT: True if column part of PK */ +/*...@out@*/ int *pAutoinc /* OUTPUT: True if column is auto-increment */ -); +) + /*...@modifies *pzDataType, *pzCollSeq, *pNotNull, *pPrimaryKey, *pAutoInc @*/; /* ** CAPI3REF: Load An Extension @@ -4103,8 +4297,10 @@ sqlite3 *db, /* Load the extension into this database connection */ const char *zFile, /* Name of the shared library containing extension */ const char *zProc, /* Entry point. Derived from zFile if 0 */ +/*...@null@*/ char **pzErrMsg /* Put error message here if not 0 */ -); +) + /*...@modifies db, *pzErrMsg @*/; /* ** CAPI3REF: Enable Or Disable Extension Loading @@ -4119,7 +4315,8 @@ ** to turn extension loading on and call it with onoff==0 to turn ** it back off again. */ -int sqlite3_enable_load_extension(sqlite3 *db, int onoff); +int sqlite3_enable_load_extension(sqlite3 *db, int onoff) + /*...@modifies db @*/; /* ** CAPI3REF: Automatically Load An Extensions @@ -4140,7 +4337,8 @@ ** multiple times with the same extension is harmless. ** ^Automatic extensions apply across all threads. */ -int sqlite3_auto_extension(void (*xEntryPoint)(void)); +int sqlite3_auto_extension(void (*xEntryPoint)(void)) + /*...@*/; /* ** CAPI3REF: Reset Automatic Extension Loading @@ -4151,7 +4349,8 @@ ** ** ^This function disables automatic extensions in all threads. */ -void sqlite3_reset_auto_extension(void); +void sqlite3_reset_auto_extension(void) + /*...@*/; /* ****** EXPERIMENTAL - subject to change without notice ************** @@ -4191,32 +4390,51 @@ */ struct sqlite3_module { int iVersion; - int (*xCreate)(sqlite3*, void *pAux, + int (*xCreate)(sqlite3* db, void *pAux, int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xConnect)(sqlite3*, void *pAux, + sqlite3_vtab **ppVTab, char**) + /*...@*/; + int (*xConnect)(sqlite3* db, void *pAux, int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); - int (*xDisconnect)(sqlite3_vtab *pVTab); - int (*xDestroy)(sqlite3_vtab *pVTab); - int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); - int (*xClose)(sqlite3_vtab_cursor*); + sqlite3_vtab **ppVTab, char**) + /*...@*/; + int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*) + /*...@*/; + int (*xDisconnect)(sqlite3_vtab *pVTab) + /*...@*/; + int (*xDestroy)(sqlite3_vtab *pVTab) + /*...@*/; + int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor) + /*...@*/; + int (*xClose)(sqlite3_vtab_cursor*) + /*...@*/; int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, - int argc, sqlite3_value **argv); - int (*xNext)(sqlite3_vtab_cursor*); - int (*xEof)(sqlite3_vtab_cursor*); - int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); - int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); - int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); - int (*xBegin)(sqlite3_vtab *pVTab); - int (*xSync)(sqlite3_vtab *pVTab); - int (*xCommit)(sqlite3_vtab *pVTab); - int (*xRollback)(sqlite3_vtab *pVTab); + int argc, sqlite3_value **argv) + /*...@*/; + int (*xNext)(sqlite3_vtab_cursor*) + /*...@*/; + int (*xEof)(sqlite3_vtab_cursor*) + /*...@*/; + int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int) + /*...@*/; + int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid) + /*...@*/; + int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *) + /*...@*/; + int (*xBegin)(sqlite3_vtab *pVTab) + /*...@*/; + int (*xSync)(sqlite3_vtab *pVTab) + /*...@*/; + int (*xCommit)(sqlite3_vtab *pVTab) + /*...@*/; + int (*xRollback)(sqlite3_vtab *pVTab) + /*...@*/; int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), - void **ppArg); - int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); + void **ppArg) + /*...@*/; + int (*xRename)(sqlite3_vtab *pVtab, const char *zNew) + /*...@*/; }; /* @@ -4331,14 +4549,16 @@ const char *zName, /* Name of the module */ const sqlite3_module *p, /* Methods for the module */ void *pClientData /* Client data for xCreate/xConnect */ -); +) + /*...@*/; SQLITE_EXPERIMENTAL int sqlite3_create_module_v2( sqlite3 *db, /* SQLite connection to register module with */ const char *zName, /* Name of the module */ const sqlite3_module *p, /* Methods for the module */ void *pClientData, /* Client data for xCreate/xConnect */ void(*xDestroy)(void*) /* Module destructor function */ -); +) + /*...@*/; /* ** CAPI3REF: Virtual Table Instance Object @@ -4398,7 +4618,8 @@ ** to declare the format (the names and datatypes of the columns) of ** the virtual tables they implement. */ -SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zSQL); +SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3* db, const char *zSQL) + /*...@modifies db @*/; /* ** CAPI3REF: Overload A Function For A Virtual Table @@ -4417,7 +4638,8 @@ ** purpose is to be a placeholder function that can be overloaded ** by a [virtual table]. */ -SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); +SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3* db, const char *zFuncName, int nArg) + /*...@*/; /* ** The interface to the virtual-table mechanism defined above (back up @@ -4502,14 +4724,16 @@ ** be released by a call to [sqlite3_blob_close()]. */ int sqlite3_blob_open( - sqlite3*, + sqlite3* db, const char *zDb, const char *zTable, const char *zColumn, sqlite3_int64 iRow, int flags, +/*...@out@*/ sqlite3_blob **ppBlob -); +) + /*...@modifies db, *ppBlob @*/; /* ** CAPI3REF: Close A BLOB Handle @@ -4533,7 +4757,8 @@ ** ^Calling this routine with a null pointer (such as would be returned ** by a failed call to [sqlite3_blob_open()]) is a harmless no-op. */ -int sqlite3_blob_close(sqlite3_blob *); +int sqlite3_blob_close(sqlite3_blob *pBlob) + /*...@*/; /* ** CAPI3REF: Return The Size Of An Open BLOB @@ -4548,7 +4773,8 @@ ** been closed by [sqlite3_blob_close()]. Passing any other pointer in ** to this routine results in undefined and probably undesirable behavior. */ -int sqlite3_blob_bytes(sqlite3_blob *); +int sqlite3_blob_bytes(sqlite3_blob *pBlob) + /*...@*/; /* ** CAPI3REF: Read Data From A BLOB Incrementally @@ -4576,7 +4802,8 @@ ** ** See also: [sqlite3_blob_write()]. */ -int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); +int sqlite3_blob_read(sqlite3_blob *pBlob, void *Z, int N, int iOffset) + /*...@*/; /* ** CAPI3REF: Write Data Into A BLOB Incrementally @@ -4614,7 +4841,8 @@ ** ** See also: [sqlite3_blob_read()]. */ -int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); +int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset) + /*...@*/; /* ** CAPI3REF: Virtual File System Objects @@ -4645,9 +4873,12 @@ ** ^(If the default VFS is unregistered, another VFS is chosen as ** the default. The choice for the new VFS is arbitrary.)^ */ -sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName); -int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); -int sqlite3_vfs_unregister(sqlite3_vfs*); +sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName) + /*...@*/; +int sqlite3_vfs_register(sqlite3_vfs* pVfs, int makeDflt) + /*...@modifies pVfs @*/; +int sqlite3_vfs_unregister(sqlite3_vfs* pVfs) + /*...@modifies pVfs @*/; /* ** CAPI3REF: Mutexes @@ -4763,11 +4994,16 @@ ** ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. */ -sqlite3_mutex *sqlite3_mutex_alloc(int); -void sqlite3_mutex_free(sqlite3_mutex*); -void sqlite3_mutex_enter(sqlite3_mutex*); -int sqlite3_mutex_try(sqlite3_mutex*); -void sqlite3_mutex_leave(sqlite3_mutex*); +sqlite3_mutex *sqlite3_mutex_alloc(int) + /*...@*/; +void sqlite3_mutex_free(sqlite3_mutex*) + /*...@*/; +void sqlite3_mutex_enter(sqlite3_mutex*) + /*...@*/; +int sqlite3_mutex_try(sqlite3_mutex*) + /*...@*/; +void sqlite3_mutex_leave(sqlite3_mutex*) + /*...@*/; /* ** CAPI3REF: Mutex Methods Object @@ -4837,15 +5073,24 @@ */ typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; struct sqlite3_mutex_methods { - int (*xMutexInit)(void); - int (*xMutexEnd)(void); - sqlite3_mutex *(*xMutexAlloc)(int); - void (*xMutexFree)(sqlite3_mutex *); - void (*xMutexEnter)(sqlite3_mutex *); - int (*xMutexTry)(sqlite3_mutex *); - void (*xMutexLeave)(sqlite3_mutex *); - int (*xMutexHeld)(sqlite3_mutex *); - int (*xMutexNotheld)(sqlite3_mutex *); + int (*xMutexInit)(void) + /*...@*/; + int (*xMutexEnd)(void) + /*...@*/; + sqlite3_mutex *(*xMutexAlloc)(int) + /*...@*/; + void (*xMutexFree)(sqlite3_mutex *) + /*...@*/; + void (*xMutexEnter)(sqlite3_mutex *) + /*...@*/; + int (*xMutexTry)(sqlite3_mutex *) + /*...@*/; + void (*xMutexLeave)(sqlite3_mutex *) + /*...@*/; + int (*xMutexHeld)(sqlite3_mutex *) + /*...@*/; + int (*xMutexNotheld)(sqlite3_mutex *) + /*...@*/; }; /* @@ -4878,8 +5123,10 @@ ** interface should also return 1 when given a NULL pointer. */ #ifndef NDEBUG -int sqlite3_mutex_held(sqlite3_mutex*); -int sqlite3_mutex_notheld(sqlite3_mutex*); +int sqlite3_mutex_held(sqlite3_mutex*) + /*...@*/; +int sqlite3_mutex_notheld(sqlite3_mutex*) + /*...@*/; #endif /* @@ -4911,7 +5158,8 @@ ** ^If the [threading mode] is Single-thread or Multi-thread then this ** routine returns a NULL pointer. */ -sqlite3_mutex *sqlite3_db_mutex(sqlite3*); +sqlite3_mutex *sqlite3_db_mutex(sqlite3* db) + /*...@*/; /* ** CAPI3REF: Low-Level Control Of Database Files @@ -4939,7 +5187,8 @@ ** ** See also: [SQLITE_FCNTL_LOCKSTATE] */ -int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); +int sqlite3_file_control(sqlite3* db, const char *zDbName, int op, void*) + /*...@*/; /* ** CAPI3REF: Testing Interface @@ -4958,7 +5207,8 @@ ** Unlike most of the SQLite API, this function is not guaranteed to ** operate consistently from one release to the next. */ -int sqlite3_test_control(int op, ...); +int sqlite3_test_control(int op, ...) + /*...@*/; /* ** CAPI3REF: Testing Interface Operation Codes @@ -5016,7 +5266,8 @@ ** ** See also: [sqlite3_db_status()] */ -SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); +SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag) + /*...@modifies *pCurrent, *pHighwater @*/; /* @@ -5124,7 +5375,8 @@ ** ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. */ -SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); +SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3* db, int op, int *pCur, int *pHiwtr, int resetFlg) + /*...@modifies db, *pCur, *pHiwtr @*/; /* ** CAPI3REF: Status Parameters for database connections @@ -5172,7 +5424,8 @@ ** ** See also: [sqlite3_status()] and [sqlite3_db_status()]. */ -SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); +SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt* pStmt, int op,int resetFlg) + /*...@*/; /* ** CAPI3REF: Status Parameters for prepared statements @@ -5344,16 +5597,26 @@ typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; struct sqlite3_pcache_methods { void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, void*, int discard); - void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); + int (*xInit)(void*) + /*...@*/; + void (*xShutdown)(void*) + /*...@*/; + sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable) + /*...@*/; + void (*xCachesize)(sqlite3_pcache*, int nCachesize) + /*...@*/; + int (*xPagecount)(sqlite3_pcache*) + /*...@*/; + void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag) + /*...@*/; + void (*xUnpin)(sqlite3_pcache*, void*, int discard) + /*...@*/; + void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey) + /*...@*/; + void (*xTruncate)(sqlite3_pcache*, unsigned iLimit) + /*...@*/; + void (*xDestroy)(sqlite3_pcache*) + /*...@*/; }; /* @@ -5551,11 +5814,16 @@ const char *zDestName, /* Destination database name */ sqlite3 *pSource, /* Source database handle */ const char *zSourceName /* Source database name */ -); -int sqlite3_backup_step(sqlite3_backup *p, int nPage); -int sqlite3_backup_finish(sqlite3_backup *p); -int sqlite3_backup_remaining(sqlite3_backup *p); -int sqlite3_backup_pagecount(sqlite3_backup *p); +) + /*...@*/; +int sqlite3_backup_step(sqlite3_backup *p, int nPage) + /*...@modifies p @*/; +int sqlite3_backup_finish(sqlite3_backup *p) + /*...@modifies p @*/; +int sqlite3_backup_remaining(sqlite3_backup *p) + /*...@*/; +int sqlite3_backup_pagecount(sqlite3_backup *p) + /*...@*/; /* ** CAPI3REF: Unlock Notification @@ -5676,7 +5944,8 @@ sqlite3 *pBlocked, /* Waiting connection */ void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ void *pNotifyArg /* Argument to pass to xNotify */ -); +) + /*...@*/; /* @@ -5688,7 +5957,8 @@ ** case-indendent fashion, using the same definition of case independence ** that SQLite uses internally when comparing identifiers. */ -int sqlite3_strnicmp(const char *, const char *, int); +int sqlite3_strnicmp(const char *, const char *, int) + /*...@*/; /* ** CAPI3REF: Error Logging Interface @@ -5712,7 +5982,8 @@ ** a few hundred characters, it will be truncated to the length of the ** buffer. */ -void sqlite3_log(int iErrCode, const char *zFormat, ...); +void sqlite3_log(int iErrCode, const char *zFormat, ...) + /*...@*/; /* ** Undo the hack that converts floating point types to integer for @@ . patch -p0 <<'@@ .' Index: sqlite/src/sqliteInt.h ============================================================================ $ cvs diff -u -r1.5 -r1.6 sqliteInt.h --- sqlite/src/sqliteInt.h 10 Jul 2010 16:34:07 -0000 1.5 +++ sqlite/src/sqliteInt.h 10 Jul 2010 20:28:43 -0000 1.6 @@ -2865,11 +2865,17 @@ int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **); void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8); #ifndef SQLITE_AMALGAMATION +/*...@unchecked@*/ extern const unsigned char sqlite3OpcodeProperty[]; +/*...@unchecked@*/ extern const unsigned char sqlite3UpperToLower[]; +/*...@unchecked@*/ extern const unsigned char sqlite3CtypeMap[]; +/*...@unchecked@*/ extern SQLITE_WSD struct Sqlite3Config sqlite3Config; +/*...@unchecked@*/ extern SQLITE_WSD FuncDefHash sqlite3GlobalFunctions; +/*...@unchecked@*/ extern int sqlite3PendingByte; #endif void sqlite3RootPageMoved(Db*, int, int); @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository [email protected]
