aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-12-23 00:07:33 +0000
committerdrh <drh@noemail.net>2011-12-23 00:07:33 +0000
commit9291372094ec5dfa66fb9ca67171a7d9c7b4ceba (patch)
tree8a4041ef59ec3769adc54222f2f8ac9ab1aae722 /src/os_unix.c
parent64803bd2fabfb0316577dee1f2173e5baba19879 (diff)
downloadsqlite-9291372094ec5dfa66fb9ca67171a7d9c7b4ceba.tar.gz
sqlite-9291372094ec5dfa66fb9ca67171a7d9c7b4ceba.zip
Add interfaces sqlite3_uri_boolean() and sqlite3_uri_int64() which are
wrappers around sqlite3_uri_parameter() combined with internal routines for converting strings to booleans and 64-bit integers. FossilOrigin-Name: 83d26b9a9115eadac9e59a33d608bca0ab2519e3
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index ee5971f10..5f26017b0 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3866,10 +3866,8 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
}
if( pInode->bProcessLock==0 ){
- const char *zRO;
int openFlags = O_RDWR | O_CREAT;
- zRO = sqlite3_uri_parameter(pDbFd->zPath, "readonly_shm");
- if( zRO && sqlite3GetBoolean(zRO) ){
+ if( sqlite3_uri_boolean(pDbFd->zPath, "readonly_shm", 0) ){
openFlags = O_RDONLY;
pShmNode->isReadonly = 1;
}