From 5660a45c226570126821c4880c09c811c3834501 Mon Sep 17 00:00:00 2001 From: vms Date: Wed, 3 Mar 2021 15:13:00 +0300 Subject: [PATCH] uncomment stuff in memdb --- src/memdb.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/memdb.c b/src/memdb.c index 23a3542..120fa10 100644 --- a/src/memdb.c +++ b/src/memdb.c @@ -17,10 +17,7 @@ ** sqlite3_deserialize(). */ #include "sqliteInt.h" -#if __sqlite_unmodified_upstream -#else #include -#endif #ifdef SQLITE_ENABLE_DESERIALIZE /* @@ -426,15 +423,7 @@ static void memdbDlClose(sqlite3_vfs *pVfs, void *pHandle){ ** random data. */ static int memdbRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){ -#if __sqlite_unmodified_upstream return ORIGVFS(pVfs)->xRandomness(ORIGVFS(pVfs), nByte, zBufOut); -#else - zBufOut = malloc(nByte); - for(int i = 0; i < nByte; ++i) { - zBufOut[i] = rand() % 256; - } - return SQLITE_OK; -#endif } /* @@ -622,23 +611,14 @@ end_deserialize: ** Register the new VFS. */ int sqlite3MemdbInit(void){ -#if __sqlite_unmodified_upstream sqlite3_vfs *pLower = sqlite3_vfs_find(0); int sz = pLower->szOsFile; memdb_vfs.pAppData = pLower; -#else - memdb_vfs.pAppData = (void *)0xFFFFFFFF; - int sz = sizeof(MemFile); -#endif /* In all known configurations of SQLite, the size of a default ** sqlite3_file is greater than the size of a memdb sqlite3_file. ** Should that ever change, remove the following NEVER() */ if( NEVER(sz