aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-08-27 21:49:34 +0000
committerdrh <drh@noemail.net>2007-08-27 21:49:34 +0000
commit97c8ec325de75d363cc989b4ad1433d33c11f7a8 (patch)
tree7d86cb9203a494b4827eece433aea36971ab9a22 /src
parent50d3f9064bc7bfd95d6a19b1a9797ee9d12f7769 (diff)
downloadsqlite-97c8ec325de75d363cc989b4ad1433d33c11f7a8.tar.gz
sqlite-97c8ec325de75d363cc989b4ad1433d33c11f7a8.zip
Bring the amalgamation builder up to date with the latest changes.
Remove some vestigial code. (CVS 4303) FossilOrigin-Name: 0ae30e5c76d9094307ea086a9993a953631ab9da
Diffstat (limited to 'src')
-rw-r--r--src/btreeInt.h4
-rw-r--r--src/os_common.h71
-rw-r--r--src/sqliteInt.h11
3 files changed, 5 insertions, 81 deletions
diff --git a/src/btreeInt.h b/src/btreeInt.h
index d67a7cf08..a491c8a2f 100644
--- a/src/btreeInt.h
+++ b/src/btreeInt.h
@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btreeInt.h,v 1.9 2007/08/22 00:39:20 drh Exp $
+** $Id: btreeInt.h,v 1.10 2007/08/27 21:49:34 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -623,7 +623,9 @@ int sqlite3BtreeGetPage(BtShared*, Pgno, MemPage**, int);
int sqlite3BtreeInitPage(MemPage *pPage, MemPage *pParent);
void sqlite3BtreeParseCellPtr(MemPage*, u8*, CellInfo*);
void sqlite3BtreeParseCell(MemPage*, int, CellInfo*);
+#ifdef SQLITE_TEST
u8 *sqlite3BtreeFindCell(MemPage *pPage, int iCell);
+#endif
int sqlite3BtreeRestoreOrClearCursorPosition(BtCursor *pCur);
void sqlite3BtreeGetTempCursor(BtCursor *pCur, BtCursor *pTempCur);
void sqlite3BtreeReleaseTempCursor(BtCursor *pCur);
diff --git a/src/os_common.h b/src/os_common.h
index 0c54405ef..8de4be971 100644
--- a/src/os_common.h
+++ b/src/os_common.h
@@ -125,74 +125,3 @@ int sqlite3_open_file_count = 0;
#else
#define OpenCounter(X)
#endif
-
-/*
-** sqlite3GenericMalloc
-** sqlite3GenericRealloc
-** sqlite3GenericOsFree
-** sqlite3GenericAllocationSize
-**
-** Implementation of the os level dynamic memory allocation interface in terms
-** of the standard malloc(), realloc() and free() found in many operating
-** systems. No rocket science here.
-**
-** There are two versions of these four functions here. The version
-** implemented here is only used if memory-management or memory-debugging is
-** enabled. This version allocates an extra 8-bytes at the beginning of each
-** block and stores the size of the allocation there.
-**
-** If neither memory-management or debugging is enabled, the second
-** set of implementations is used instead.
-*/
-#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || defined (SQLITE_MEMDEBUG)
-void *sqlite3GenericMalloc(int n){
- char *p = (char *)malloc(n+8);
- assert(n>0);
- assert(sizeof(int)<=8);
- if( p ){
- *(int *)p = n;
- p += 8;
- }
- return (void *)p;
-}
-void *sqlite3GenericRealloc(void *p, int n){
- char *p2 = ((char *)p - 8);
- assert(n>0);
- p2 = (char*)realloc(p2, n+8);
- if( p2 ){
- *(int *)p2 = n;
- p2 += 8;
- }
- return (void *)p2;
-}
-void sqlite3GenericFree(void *p){
- assert(p);
- free((void *)((char *)p - 8));
-}
-int sqlite3GenericAllocationSize(void *p){
- return p ? *(int *)((char *)p - 8) : 0;
-}
-#else
-void *sqlite3GenericMalloc(int n){
- char *p = (char *)malloc(n);
- return (void *)p;
-}
-void *sqlite3GenericRealloc(void *p, int n){
- assert(n>0);
- p = realloc(p, n);
- return p;
-}
-void sqlite3GenericFree(void *p){
- assert(p);
- free(p);
-}
-/* Never actually used, but needed for the linker */
-int sqlite3GenericAllocationSize(void *p){ return 0; }
-#endif
-
-/*
-** The default size of a disk sector
-*/
-#ifndef PAGER_SECTOR_SIZE
-# define PAGER_SECTOR_SIZE 512
-#endif
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 7e0c59f6a..86951a31c 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.600 2007/08/25 14:39:46 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.601 2007/08/27 21:49:34 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -280,7 +280,6 @@ typedef struct NameContext NameContext;
typedef struct Parse Parse;
typedef struct Select Select;
typedef struct SrcList SrcList;
-typedef struct ThreadData ThreadData;
typedef struct Table Table;
typedef struct TableLock TableLock;
typedef struct Token Token;
@@ -1533,11 +1532,11 @@ int sqlite3IsNumber(const char*, int*, u8);
void *sqlite3MallocZero(unsigned);
void *sqlite3DbMallocZero(sqlite3*, unsigned);
void *sqlite3DbMallocRaw(sqlite3*, unsigned);
-void *sqlite3ReallocOrFree(sqlite3*,void*,int);
char *sqlite3StrDup(const char*);
char *sqlite3StrNDup(const char*, int);
char *sqlite3DbStrDup(sqlite3*,const char*);
char *sqlite3DbStrNDup(sqlite3*,const char*, int);
+void *sqlite3DbReallocOrFree(sqlite3 *, void *, int);
char *sqlite3MPrintf(sqlite3*,const char*, ...);
char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
@@ -1779,9 +1778,6 @@ int sqlite3AnalysisLoad(sqlite3*,int iDB);
void sqlite3DefaultRowEst(Index*);
void sqlite3RegisterLikeFunctions(sqlite3*, int);
int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
-ThreadData *sqlite3ThreadData(void);
-const ThreadData *sqlite3ThreadDataReadOnly(void);
-void sqlite3ReleaseThreadData(void);
void sqlite3AttachFunctions(sqlite3 *);
void sqlite3MinimumFileFormat(Parse*, int, int);
void sqlite3SchemaFree(void *);
@@ -1792,12 +1788,9 @@ 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);
-void sqlite3FailedMalloc(void);
void sqlite3AbortOtherActiveVdbes(sqlite3 *, Vdbe *);
int sqlite3OpenTempDatabase(Parse *);
-void *sqlite3DbReallocOrFree(sqlite3 *, void *, int);
-sqlite3 *sqlite3DbOfVdbe(Vdbe *);
/*
** The interface to the LEMON-generated parser