Commit 27eb78c
Open UCD database in read only mode
Changed files (3)
modifiedlibbirdfont/CharDatabase.valamodifiedlibbirdfont/CharDatabaseParser.valamodifiedlibbirdfont/OpenFontFormat/CodePageBits.vala
Diff
@@ -33,7 +33,7 @@ public class CharDatabase { public static void open_database () { File f = get_database_file ();- int rc = Database.open ((!) f.get_path (), out database);+ int rc = Database.open_v2 ((!) f.get_path (), out database, OPEN_READONLY); db = (!) database; @@ -46,7 +46,7 @@ public class CharDatabaseParser : GLib.Object { f.delete (); } - open_database ();+ open_database (OPEN_READWRITE); create_tables (); parse_all_entries (); } catch (GLib.Error e) {@@ -54,9 +54,9 @@ public class CharDatabaseParser : GLib.Object { } } - public void open_database () {+ public void open_database (int access_mode) { File f = get_database_file ();- int rc = Database.open ((!) f.get_path (), out database);+ int rc = Database.open_v2 ((!) f.get_path (), out database, access_mode); db = (!) database; @@ -28,7 +28,7 @@ public class CodePageBits : GLib.Object { public CodePageBits () { if (database == null) {- open_database (get_database_file ());+ open_database (get_database_file (), OPEN_READONLY); } } @@ -192,7 +192,7 @@ public class CodePageBits : GLib.Object { f.delete (); } - open_database (f);+ open_database (f, OPEN_READWRITE); create_tables (); default_range = new PageBit (-1, "null-");@@ -242,8 +242,8 @@ public class CodePageBits : GLib.Object { } } - void open_database (File db_file) {- int rc = Database.open ((!) db_file.get_path (), out database);+ void open_database (File db_file, int access) {+ int rc = Database.open_v2 ((!) db_file.get_path (), out database, access); db = (!) database; @@ -333,3 +333,4 @@ public class CodePageBits : GLib.Object { } }+ \ No newline at end of file