diff options
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 1b831f20f..3f28e145c 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.568 2007/05/15 16:51:37 drh Exp $ +** @(#) $Id: sqliteInt.h,v 1.569 2007/05/16 17:28:43 danielk1977 Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -254,10 +254,19 @@ extern int sqlite3_iLine; /* Line number for debug info */ #endif +/* Variable sqlite3_mallocHasFailed 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)) + #define sqliteFree(x) sqlite3FreeX(x) #define sqliteAllocSize(x) sqlite3AllocSize(x) - /* ** An instance of this structure might be allocated to store information ** specific to a single thread. @@ -333,6 +342,8 @@ typedef struct Trigger Trigger; typedef struct WhereInfo WhereInfo; typedef struct WhereLevel WhereLevel; +#include "os.h" + /* ** Each database file to be accessed by the system is an instance ** of the following structure. There are normally two of these structures @@ -1878,7 +1889,6 @@ int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *, void (*)(sqlite3_context*,int,sqlite3_value **), void (*)(sqlite3_context*,int,sqlite3_value **), void (*)(sqlite3_context*)); int sqlite3ApiExit(sqlite3 *db, int); -int sqlite3MallocFailed(void); void sqlite3FailedMalloc(void); void sqlite3AbortOtherActiveVdbes(sqlite3 *, Vdbe *); int sqlite3OpenTempDatabase(Parse *); |