diff options
author | drh <drh@noemail.net> | 2010-07-03 17:13:31 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-07-03 17:13:31 +0000 |
commit | 2667be5e3fa58c7724efeccfcad22efddcc77ff0 (patch) | |
tree | 7d318eff45506f0abe3910f6703237518a5725b5 /src | |
parent | b3f4351f005d1f8b9de672b7e76dfbf1d9c6fe75 (diff) | |
download | sqlite-2667be5e3fa58c7724efeccfcad22efddcc77ff0.tar.gz sqlite-2667be5e3fa58c7724efeccfcad22efddcc77ff0.zip |
Remove the unused xRename() method from the sqlite3_vfs object.
Add better documentation on the xCurrentTimeInt64() method.
FossilOrigin-Name: 51ec0e5432dd6849b83a3d969a018482eb3bb083
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 1 | ||||
-rw-r--r-- | src/os_win.c | 1 | ||||
-rw-r--r-- | src/sqlite.h.in | 16 | ||||
-rw-r--r-- | src/test6.c | 1 | ||||
-rw-r--r-- | src/test_devsym.c | 1 | ||||
-rw-r--r-- | src/test_journal.c | 1 | ||||
-rw-r--r-- | src/test_onefile.c | 1 | ||||
-rw-r--r-- | src/test_osinst.c | 7 | ||||
-rw-r--r-- | src/test_vfs.c | 3 |
9 files changed, 13 insertions, 19 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index a41b57983..23b558b09 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -6084,7 +6084,6 @@ int sqlite3_os_init(void){ unixSleep, /* xSleep */ \ unixCurrentTime, /* xCurrentTime */ \ unixGetLastError, /* xGetLastError */ \ - 0, /* xRename */ \ unixCurrentTimeInt64, /* xCurrentTimeInt64 */ \ } diff --git a/src/os_win.c b/src/os_win.c index 5f2e05323..51223dfe9 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -2478,7 +2478,6 @@ int sqlite3_os_init(void){ winSleep, /* xSleep */ winCurrentTime, /* xCurrentTime */ winGetLastError, /* xGetLastError */ - 0, /* xRename */ winCurrentTimeInt64, /* xCurrentTimeInt64 */ }; diff --git a/src/sqlite.h.in b/src/sqlite.h.in index f91f25b3f..1c1f42441 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -827,16 +827,23 @@ typedef struct sqlite3_mutex sqlite3_mutex; ** handled as a fatal error by SQLite, vfs implementations should endeavor ** to prevent this by setting mxPathname to a sufficiently large value. ** -** The xRandomness(), xSleep(), and xCurrentTime() interfaces -** are not strictly a part of the filesystem, but they are +** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() +** interfaces are not strictly a part of the filesystem, but they are ** included in the VFS structure for completeness. ** The xRandomness() function attempts to return nBytes bytes ** of good-quality randomness into zOut. The return value is ** the actual number of bytes of randomness obtained. ** The xSleep() method causes the calling thread to sleep for at ** least the number of microseconds given. The xCurrentTime() -** method returns a Julian Day Number for the current date and time. -** +** method returns a Julian Day Number for the current date and time as +** a floating point value. +** The xCurrentTimeInt64() method returns, as an integer, the Julian +** Day Number multipled by 86400000 (the number of milliseconds in +** a 24-hour day). +** ^SQLite will use the xCurrentTimeInt64() method to get the current +** date and time if that method is available (if iVersion is 2 or +** greater and the function pointer is not NULL) and will fall back +** to xCurrentTime() if xCurrentTimeInt64() is unavailable. */ typedef struct sqlite3_vfs sqlite3_vfs; struct sqlite3_vfs { @@ -863,7 +870,6 @@ struct sqlite3_vfs { ** The methods above are in version 1 of the sqlite_vfs object ** definition. Those that follow are added in version 2 or later */ - int (*xRename)(sqlite3_vfs*, const char *zOld, const char *zNew, int dirSync); int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); /* ** The methods above are in versions 1 and 2 of the sqlite_vfs object. diff --git a/src/test6.c b/src/test6.c index 5b5ee38b9..2c06174ea 100644 --- a/src/test6.c +++ b/src/test6.c @@ -813,7 +813,6 @@ static int crashEnableCmd( cfSleep, /* xSleep */ cfCurrentTime, /* xCurrentTime */ 0, /* xGetlastError */ - 0, /* xRename */ 0, /* xCurrentTimeInt64 */ }; diff --git a/src/test_devsym.c b/src/test_devsym.c index 7f4326c47..f2b91f03c 100644 --- a/src/test_devsym.c +++ b/src/test_devsym.c @@ -99,7 +99,6 @@ static sqlite3_vfs devsym_vfs = { devsymSleep, /* xSleep */ devsymCurrentTime, /* xCurrentTime */ 0, /* xGetLastError */ - 0, /* xRename */ 0 /* xCurrentTimeInt64 */ }; diff --git a/src/test_journal.c b/src/test_journal.c index 17166f780..97e0e1b70 100644 --- a/src/test_journal.c +++ b/src/test_journal.c @@ -182,7 +182,6 @@ static sqlite3_vfs jt_vfs = { jtSleep, /* xSleep */ jtCurrentTime, /* xCurrentTime */ 0, /* xGetLastError */ - 0, /* xRename */ jtCurrentTimeInt64 /* xCurrentTimeInt64 */ }; diff --git a/src/test_onefile.c b/src/test_onefile.c index 39b410b4a..65c6b7afd 100644 --- a/src/test_onefile.c +++ b/src/test_onefile.c @@ -199,7 +199,6 @@ static fs_vfs_t fs_vfs = { fsRandomness, /* xRandomness */ fsSleep, /* xSleep */ fsCurrentTime, /* xCurrentTime */ - 0, /* xRename */ 0 /* xCurrentTimeInt64 */ }, 0, /* pFileList */ diff --git a/src/test_osinst.c b/src/test_osinst.c index 206a2e9ca..d77eeafa5 100644 --- a/src/test_osinst.c +++ b/src/test_osinst.c @@ -22,7 +22,7 @@ ** overhead introduced into the application by logging. ** ** All calls on sqlite3_file objects except xFileControl() are logged. -** Additionally, calls to the xAccess(), xOpen(), xDelete() and xRename() +** Additionally, calls to the xAccess(), xOpen(), and xDelete() ** methods are logged. The other sqlite3_vfs object methods (xDlXXX, ** xRandomness, xSleep, xCurrentTime, xGetLastError and xCurrentTimeInt64) ** are not logged. @@ -171,7 +171,6 @@ static int vfslogSleep(sqlite3_vfs*, int microseconds); static int vfslogCurrentTime(sqlite3_vfs*, double*); static int vfslogGetLastError(sqlite3_vfs*, int, char *); -static int vfslogRename(sqlite3_vfs*, const char *, const char *, int); static int vfslogCurrentTimeInt64(sqlite3_vfs*, sqlite3_int64*); static sqlite3_vfs vfslog_vfs = { @@ -193,7 +192,6 @@ static sqlite3_vfs vfslog_vfs = { vfslogSleep, /* xSleep */ vfslogCurrentTime, /* xCurrentTime */ vfslogGetLastError, /* xGetLastError */ - vfslogRename, /* xRename */ vfslogCurrentTimeInt64 /* xCurrentTime */ }; @@ -616,9 +614,6 @@ static int vfslogCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){ static int vfslogGetLastError(sqlite3_vfs *pVfs, int a, char *b){ return REALVFS(pVfs)->xGetLastError(REALVFS(pVfs), a, b); } -static int vfslogRename(sqlite3_vfs *pVfs, const char *a, const char *b, int c){ - return REALVFS(pVfs)->xRename(REALVFS(pVfs), a, b, c); -} static int vfslogCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *p){ return REALVFS(pVfs)->xCurrentTimeInt64(REALVFS(pVfs), p); } diff --git a/src/test_vfs.c b/src/test_vfs.c index 964481302..1b5bd59fb 100644 --- a/src/test_vfs.c +++ b/src/test_vfs.c @@ -1296,8 +1296,7 @@ static int testvfs_cmd( tvfsSleep, /* xSleep */ tvfsCurrentTime, /* xCurrentTime */ 0, /* xGetLastError */ - 0, - 0, + 0, /* xCurrentTimeInt64 */ }; Testvfs *p; /* New object */ |