1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Move error simulation code from the sqlite3_os_init() functions into a wrapper.

FossilOrigin-Name: 67ad21abf88abb7a3e2eacddcaf1ab5d54149807
This commit is contained in:
dan
2009-08-17 15:52:25 +00:00
parent 7c7c311da5
commit 3d6e060b48
9 changed files with 57 additions and 43 deletions

View File

@@ -190,6 +190,17 @@ int sqlite3OsCloseFree(sqlite3_file *pFile){
return rc;
}
/*
** This function is a wrapper around the OS specific implementation of
** sqlite3_os_init(). The purpose of the wrapper is to provide the
** ability to simulate a malloc failure, so that the handling of an
** error in sqlite3_os_init() by the upper layers can be tested.
*/
int sqlite3OsInit(void){
DO_OS_MALLOC_TEST(0);
return sqlite3_os_init();
}
/*
** The list of all registered VFS implementations.
*/