[tracker/rss-enclosures] libtracker-db: Performance improvement for TrackerDBResultSet



commit 5ca65e47058d261ee809130dd35575cef6f31ac4
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Apr 14 13:57:50 2010 +0200

    libtracker-db: Performance improvement for TrackerDBResultSet

 src/libtracker-db/tracker-db-interface.c |    6 +++---
 src/libtracker-db/tracker-db-interface.h |    2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-interface.c b/src/libtracker-db/tracker-db-interface.c
index 170d899..19810d3 100644
--- a/src/libtracker-db/tracker-db-interface.c
+++ b/src/libtracker-db/tracker-db-interface.c
@@ -23,9 +23,8 @@
 
 #include "tracker-db-interface.h"
 
-#define TRACKER_DB_RESULT_SET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_DB_RESULT_SET, TrackerDBResultSetPrivate))
-
-typedef struct TrackerDBResultSetPrivate TrackerDBResultSetPrivate;
+#define TRACKER_DB_RESULT_SET_GET_PRIVATE_O(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_DB_RESULT_SET, TrackerDBResultSetPrivate))
+#define TRACKER_DB_RESULT_SET_GET_PRIVATE(o) (((TrackerDBResultSet*)o)->priv)
 
 struct TrackerDBResultSetPrivate {
 	GType *col_types;
@@ -214,6 +213,7 @@ tracker_db_result_set_class_init (TrackerDBResultSetClass *class)
 static void
 tracker_db_result_set_init (TrackerDBResultSet *result_set)
 {
+	result_set->priv = TRACKER_DB_RESULT_SET_GET_PRIVATE_O (result_set);
 }
 
 static TrackerDBResultSet *
diff --git a/src/libtracker-db/tracker-db-interface.h b/src/libtracker-db/tracker-db-interface.h
index b924a64..8372054 100644
--- a/src/libtracker-db/tracker-db-interface.h
+++ b/src/libtracker-db/tracker-db-interface.h
@@ -65,6 +65,7 @@ typedef struct TrackerDBResultSet      TrackerDBResultSet;
 typedef struct TrackerDBResultSetClass TrackerDBResultSetClass;
 typedef struct TrackerDBCursor         TrackerDBCursor;
 typedef struct TrackerDBCursorIface    TrackerDBCursorIface;
+typedef struct TrackerDBResultSetPrivate TrackerDBResultSetPrivate;
 
 struct TrackerDBInterfaceIface {
 	GTypeInterface iface;
@@ -101,6 +102,7 @@ struct TrackerDBStatementIface {
 
 struct TrackerDBResultSet {
 	GObject parent_class;
+	TrackerDBResultSetPrivate *priv;
 };
 
 struct TrackerDBResultSetClass {



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