Skip to content

Commit

Permalink
Change function declaration from extern to static
Browse files Browse the repository at this point in the history
  • Loading branch information
utelle committed Dec 7, 2024
1 parent f8ecc2d commit b745e46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/patchsqlite3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ sed 's/sqlite3_file_control\(.*SQLITE_FCNTL_PRAGMA\)/sqlite3mcFileControlPragma\
| sed '/^ }else if( USEFETCH(pPager) ){/c \ }else if( USEFETCH(pPager) && sqlite3mcPagerHasCodec(pPager) == 0 ){' \
| sed '/^ if( rc!=SQLITE_OK ) memset(&mem0, 0, sizeof(mem0));/a \\n \/\* Initialize wrapper for memory management.\*\/\n if( rc==SQLITE_OK ) {\n sqlite3mcInitMemoryMethods();\n }\n' \
| sed '/Lock the source database handle./i \ \/\* Check whether databases are compatible with backup \*\/\n if (!sqlite3mcIsBackupSupported(pSrcDb, zSrcDb, pDestDb, zDestDb)){\n sqlite3ErrorWithMsg(pDestDb, SQLITE_ERROR, \"backup is not supported with incompatible source and target databases\");\n return NULL;\n }\n' \
| sed '/nRes = sqlite3BtreeGetRequestedReserve(pMain)/a \\n \/\* A VACUUM cannot change the pagesize of an encrypted database. \*\/\n if( db->nextPagesize ){\n extern void sqlite3mcCodecGetKey(sqlite3*, int, void**, int*);\n int nKey;\n char *zKey;\n sqlite3mcCodecGetKey(db, iDb, (void**)&zKey, &nKey);\n if( nKey ) db->nextPagesize = 0;\n }' \
| sed '/nRes = sqlite3BtreeGetRequestedReserve(pMain)/a \\n \/\* A VACUUM cannot change the pagesize of an encrypted database. \*\/\n if( db->nextPagesize ){\n static void sqlite3mcCodecGetKey(sqlite3*, int, void**, int*);\n int nKey;\n char *zKey;\n sqlite3mcCodecGetKey(db, iDb, (void**)&zKey, &nKey);\n if( nKey ) db->nextPagesize = 0;\n }' \
2 changes: 1 addition & 1 deletion src/sqlite3patched.c
Original file line number Diff line number Diff line change
Expand Up @@ -156218,7 +156218,7 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3RunVacuum(

/* A VACUUM cannot change the pagesize of an encrypted database. */
if( db->nextPagesize ){
extern void sqlite3mcCodecGetKey(sqlite3*, int, void**, int*);
static void sqlite3mcCodecGetKey(sqlite3*, int, void**, int*);
int nKey;
char *zKey;
sqlite3mcCodecGetKey(db, iDb, (void**)&zKey, &nKey);
Expand Down

0 comments on commit b745e46

Please sign in to comment.