diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/malloc.c | 10 | ||||
-rw-r--r-- | src/os_common.h | 2 | ||||
-rw-r--r-- | src/sqliteInt.h | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/malloc.c b/src/malloc.c index 2ae3a55ad..8a993326b 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -12,7 +12,7 @@ ** Memory allocation functions used throughout sqlite. ** ** -** $Id: malloc.c,v 1.3 2007/06/15 20:29:20 drh Exp $ +** $Id: malloc.c,v 1.4 2007/08/08 01:04:52 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -792,10 +792,10 @@ void sqlite3SetString(char **pz, ...){ ** then the connection error-code (the value returned by sqlite3_errcode()) ** is set to SQLITE_NOMEM. */ -int sqlite3_mallocHasFailed = 0; +int sqlite3MallocHasFailed = 0; int sqlite3ApiExit(sqlite3* db, int rc){ if( sqlite3MallocFailed() ){ - sqlite3_mallocHasFailed = 0; + sqlite3MallocHasFailed = 0; sqlite3OsLeaveMutex(); sqlite3Error(db, SQLITE_NOMEM, 0); rc = SQLITE_NOMEM; @@ -809,8 +809,8 @@ int sqlite3ApiExit(sqlite3* db, int rc){ void sqlite3FailedMalloc(){ if( !sqlite3MallocFailed() ){ sqlite3OsEnterMutex(); - assert( sqlite3_mallocHasFailed==0 ); - sqlite3_mallocHasFailed = 1; + assert( sqlite3MallocHasFailed==0 ); + sqlite3MallocHasFailed = 1; } } diff --git a/src/os_common.h b/src/os_common.h index ba52314ce..4294dd7fc 100644 --- a/src/os_common.h +++ b/src/os_common.h @@ -36,8 +36,8 @@ unsigned int sqlite3_pending_byte = 0x40000000; #endif +#ifdef SQLITE_TEST int sqlite3_os_trace = 0; -#ifdef SQLITE_DEBUG #define OSTRACE1(X) if( sqlite3_os_trace ) sqlite3DebugPrintf(X) #define OSTRACE2(X,Y) if( sqlite3_os_trace ) sqlite3DebugPrintf(X,Y) #define OSTRACE3(X,Y,Z) if( sqlite3_os_trace ) sqlite3DebugPrintf(X,Y,Z) diff --git a/src/sqliteInt.h b/src/sqliteInt.h index dfb953e4c..f2868b504 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.583 2007/08/07 17:13:04 drh Exp $ +** @(#) $Id: sqliteInt.h,v 1.584 2007/08/08 01:04:52 drh Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -256,15 +256,15 @@ extern int sqlite3_iLine; /* Line number for debug info */ #endif -/* Variable sqlite3_mallocHasFailed is set to true after a malloc() +/* Variable sqlite3MallocHasFailed is set to true after a malloc() ** failure occurs. ** ** The sqlite3MallocFailed() macro returns true if a malloc has failed ** in this thread since the last call to sqlite3ApiExit(), or false ** otherwise. */ -extern int sqlite3_mallocHasFailed; -#define sqlite3MallocFailed() (sqlite3_mallocHasFailed && sqlite3OsInMutex(1)) +extern int sqlite3MallocHasFailed; +#define sqlite3MallocFailed() (sqlite3MallocHasFailed && sqlite3OsInMutex(1)) #define sqliteFree(x) sqlite3FreeX(x) #define sqliteAllocSize(x) sqlite3AllocSize(x) |