[rygel] db: Make it possible to share collation functions



commit 25f77240d476c5b245075cce040c1baf0c0c4441
Author: Jens Georg <mail jensge org>
Date:   Sun Apr 19 15:45:46 2015 +0200

    db: Make it possible to share collation functions
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/librygel-db/database.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/librygel-db/database.vala b/src/librygel-db/database.vala
index 25b3f97..15d0fd1 100644
--- a/src/librygel-db/database.vala
+++ b/src/librygel-db/database.vala
@@ -53,9 +53,9 @@ public class Rygel.Database.Database : SqliteWrapper {
     /**
      * Function to implement the custom SQL function 'contains'
      */
-    private static void utf8_contains (Sqlite.Context context,
-                                       Sqlite.Value[] args)
-                                       requires (args.length == 2) {
+    public static void utf8_contains (Sqlite.Context context,
+                                      Sqlite.Value[] args)
+                                      requires (args.length == 2) {
         if (args[0].to_text () == null ||
             args[1].to_text () == null) {
            context.result_int (0);
@@ -78,7 +78,7 @@ public class Rygel.Database.Database : SqliteWrapper {
      *
      * Uses utf8 case-fold to compare the strings.
      */
-    private static int utf8_collate (int alen, void* a, int blen, void* b) {
+    public static int utf8_collate (int alen, void* a, int blen, void* b) {
         // unowned to prevent array copy
         unowned uint8[] _a = (uint8[]) a;
         _a.length = alen;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]