Replace flags argument to Sql.open with single bool

Previously, "flags" argument of Sql.open was of type libc::c_int, but
only one bit was used: whether to open database read-only. This commit
makes it explicit by changing type to bool and renaming argument.
This commit is contained in:
Dmitry Bogatov
2019-10-12 05:04:17 +00:00
committed by Floris Bruynooghe
parent 8479c8afbf
commit a4257b619a
3 changed files with 10 additions and 12 deletions

View File

@@ -150,7 +150,7 @@ impl Context {
};
ensure!(
ctx.sql.open(&ctx, &ctx.dbfile, 0),
ctx.sql.open(&ctx, &ctx.dbfile, false),
"Failed opening sqlite database"
);