From 997e22224e1062a4cd39373057a68879a1d7a3ac Mon Sep 17 00:00:00 2001 From: "mdm@chromium.org" Date: Fri, 18 Sep 2009 18:27:25 +0000 Subject: Update sqlite to version 3.6.18, porting our patches. Hopefully this will help to address some valgrind issues. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26596 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/sqlite/src/test_devsym.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'third_party/sqlite/src/test_devsym.c') diff --git a/third_party/sqlite/src/test_devsym.c b/third_party/sqlite/src/test_devsym.c index 0314804..d428e4d 100644 --- a/third_party/sqlite/src/test_devsym.c +++ b/third_party/sqlite/src/test_devsym.c @@ -14,7 +14,7 @@ ** different device types (by overriding the return values of the ** xDeviceCharacteristics() and xSectorSize() methods). ** -** $Id: test_devsym.c,v 1.7 2008/06/06 11:11:26 danielk1977 Exp $ +** $Id: test_devsym.c,v 1.9 2008/12/09 01:32:03 drh Exp $ */ #if SQLITE_TEST /* This file is used for testing only */ @@ -63,7 +63,7 @@ static int devsymFullPathname(sqlite3_vfs*, const char *zName, int, char *zOut); #ifndef SQLITE_OMIT_LOAD_EXTENSION static void *devsymDlOpen(sqlite3_vfs*, const char *zFilename); static void devsymDlError(sqlite3_vfs*, int nByte, char *zErrMsg); -static void *devsymDlSym(sqlite3_vfs*,void*, const char *zSymbol); +static void (*devsymDlSym(sqlite3_vfs*,void*, const char *zSymbol))(void); static void devsymDlClose(sqlite3_vfs*, void*); #endif /* SQLITE_OMIT_LOAD_EXTENSION */ static int devsymRandomness(sqlite3_vfs*, int nByte, char *zOut); @@ -234,10 +234,14 @@ static int devsymOpen( int flags, int *pOutFlags ){ + int rc; devsym_file *p = (devsym_file *)pFile; - pFile->pMethods = &devsym_io_methods; p->pReal = (sqlite3_file *)&p[1]; - return sqlite3OsOpen(g.pVfs, zName, p->pReal, flags, pOutFlags); + rc = sqlite3OsOpen(g.pVfs, zName, p->pReal, flags, pOutFlags); + if( p->pReal->pMethods ){ + pFile->pMethods = &devsym_io_methods; + } + return rc; } /* @@ -296,8 +300,8 @@ static void devsymDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){ /* ** Return a pointer to the symbol zSymbol in the dynamic library pHandle. */ -static void *devsymDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){ - return sqlite3OsDlSym(g.pVfs, pHandle, zSymbol); +static void (*devsymDlSym(sqlite3_vfs *pVfs, void *p, const char *zSym))(void){ + return sqlite3OsDlSym(g.pVfs, p, zSym); } /* -- cgit v1.1