1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Instead of (const char*), use a special type - sqlite3_filename - as the filename argument passed to VFS method xOpen().

FossilOrigin-Name: bd1fe4de8a2e8b8de19a7f90b9fdafb641ad11a6f0c96c0b4495d5bf80885675
This commit is contained in:
dan
2022-11-01 17:43:19 +00:00
parent 11980a6b8e
commit 52d5d474f5
5 changed files with 50 additions and 27 deletions

View File

@@ -4510,7 +4510,7 @@ static char *appendText(char *p, const char *z){
** Memory layout must be compatible with that generated by the pager
** and expected by sqlite3_uri_parameter() and databaseName().
*/
char *sqlite3_create_filename(
const char *sqlite3_create_filename(
const char *zDatabase,
const char *zJournal,
const char *zWal,
@@ -4546,10 +4546,10 @@ char *sqlite3_create_filename(
** error to call this routine with any parameter other than a pointer
** previously obtained from sqlite3_create_filename() or a NULL pointer.
*/
void sqlite3_free_filename(char *p){
void sqlite3_free_filename(const char *p){
if( p==0 ) return;
p = (char*)databaseName(p);
sqlite3_free(p - 4);
p = databaseName(p);
sqlite3_free((char*)p - 4);
}