mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Change a few selected functions to macros to speed things up. (CVS 4015)
FossilOrigin-Name: 93f811ec747f6a42daf9ee27cd8b013f248552a1
This commit is contained in:
@@ -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 *);
|
||||
|
||||
Reference in New Issue
Block a user