1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Change the signature of the xUnfetch method to "int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p)".

FossilOrigin-Name: 115b830509e8f0aa9d5965c1e9cd4f2ed9d01938
This commit is contained in:
dan
2013-03-25 17:00:24 +00:00
parent aef49d7141
commit df737fe6f5
7 changed files with 32 additions and 26 deletions

View File

@@ -4591,13 +4591,16 @@ static int unixFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
}
/*
** If the second argument is non-NULL, then this function releases a
** reference obtained by an earlier call to unixFetch(). Or, if the second
** argument is NULL, then this function is being called to inform the VFS
** layer that, according to POSIX, any existing mapping may now be invalid
** and should be unmapped.
** If the third argument is non-NULL, then this function releases a
** reference obtained by an earlier call to unixFetch(). The second
** argument passed to this function must be the same as the corresponding
** argument that was passed to the unixFetch() invocation.
**
** Or, if the third argument is NULL, then this function is being called
** to inform the VFS layer that, according to POSIX, any existing mapping
** may now be invalid and should be unmapped.
*/
static int unixUnfetch(sqlite3_file *fd, void *p){
static int unixUnfetch(sqlite3_file *fd, i64 iOff, void *p){
unixFile *pFd = (unixFile *)fd; /* The underlying database file */
/* If p==0 (unmap the entire file) then there must be no outstanding
@@ -4605,6 +4608,9 @@ static int unixUnfetch(sqlite3_file *fd, void *p){
** then there must be at least one outstanding. */
assert( (p==0)==(pFd->nFetchOut==0) );
/* If p!=0, it must match the iOff value. */
assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );
if( p ){
pFd->nFetchOut--;
}else{