/ Check-in [3de085ea]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a non-C89 variable declaration that causes problems for MSVC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | status64
Files: files | file ages | folders
SHA1: 3de085eab2fbe491f2242b340851e8af8f61ad13
User & Date: drh 2015-03-23 19:16:30
Context
2015-03-23
19:55
Track total memory usage using a 64-bit integer on 64-bit systems. Add the sqlite3_status64() interface. Make the sqlite3_status() and sqlite3_status64() interfaces atomic using mutexes and verify correct mutex operation using assert() statements. check-in: 6fc4e79a user: drh tags: trunk
19:16
Fix a non-C89 variable declaration that causes problems for MSVC. Closed-Leaf check-in: 3de085ea user: drh tags: status64
18:52
Add the SQLITE_PTRSIZE macro. Use it to help sqlite3_status() run faster on 32-bit systems. check-in: c742bd60 user: drh tags: status64
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/status.c.

128
129
130
131
132
133
134
135
136

137
138
139
140
141
142
143
*/
int sqlite3_status64(
  int op,
  sqlite3_int64 *pCurrent,
  sqlite3_int64 *pHighwater,
  int resetFlag
){
  wsdStatInit;
  sqlite3_mutex *pMutex;

  if( op<0 || op>=ArraySize(wsdStat.nowValue) ){
    return SQLITE_MISUSE_BKPT;
  }
#ifdef SQLITE_ENABLE_API_ARMOR
  if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
#endif
  pMutex = statMutex[op] ? sqlite3Pcache1Mutex() : sqlite3MallocMutex();







<

>







128
129
130
131
132
133
134

135
136
137
138
139
140
141
142
143
*/
int sqlite3_status64(
  int op,
  sqlite3_int64 *pCurrent,
  sqlite3_int64 *pHighwater,
  int resetFlag
){

  sqlite3_mutex *pMutex;
  wsdStatInit;
  if( op<0 || op>=ArraySize(wsdStat.nowValue) ){
    return SQLITE_MISUSE_BKPT;
  }
#ifdef SQLITE_ENABLE_API_ARMOR
  if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
#endif
  pMutex = statMutex[op] ? sqlite3Pcache1Mutex() : sqlite3MallocMutex();