[tracker] tracker-fts: Header file cleanup
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-fts: Header file cleanup
- Date: Mon, 24 Aug 2009 16:19:51 +0000 (UTC)
commit bbf15963e896dd810fc57dec2a32eabf546f13ed
Author: Jürg Billeter <j bitron ch>
Date: Mon Aug 24 09:59:40 2009 +0200
tracker-fts: Header file cleanup
src/libtracker-db/tracker-db-interface-sqlite.c | 2 +-
src/tracker-fts/tracker-fts.c | 2 +-
src/tracker-fts/tracker-fts.h | 20 ++++++++++++--------
utils/tracker-fts/tracker-fts-test.c | 2 +-
4 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-interface-sqlite.c b/src/libtracker-db/tracker-db-interface-sqlite.c
index bcc8281..ac869a3 100644
--- a/src/libtracker-db/tracker-db-interface-sqlite.c
+++ b/src/libtracker-db/tracker-db-interface-sqlite.c
@@ -130,7 +130,7 @@ tracker_db_interface_sqlite_constructor (GType type,
sqlite3_extended_result_codes (priv->db, 0);
sqlite3_busy_timeout (priv->db, 100000);
- if (sqlite3Fts3Init (priv->db) != SQLITE_OK) {
+ if (tracker_fts_init (priv->db) != SQLITE_OK) {
g_critical ("Could not initialize tracker-fts extension");
} else {
g_message ("Initialized tracker fts extension");
diff --git a/src/tracker-fts/tracker-fts.c b/src/tracker-fts/tracker-fts.c
index 784ad13..c50df48 100644
--- a/src/tracker-fts/tracker-fts.c
+++ b/src/tracker-fts/tracker-fts.c
@@ -7794,7 +7794,7 @@ int sqlite3Fts3InitHashTable(sqlite3 *, fts3Hash *, const char *);
** SQLite. If fts3 is built as a dynamically loadable extension, this
** function is called by the sqlite3_extension_init() entry point.
*/
-int sqlite3Fts3Init(sqlite3 *db){
+int tracker_fts_init(sqlite3 *db){
int rc = SQLITE_OK;
/* Create the virtual table wrapper around the hash-table and overload
diff --git a/src/tracker-fts/tracker-fts.h b/src/tracker-fts/tracker-fts.h
index 6712e16..1ee8209 100644
--- a/src/tracker-fts/tracker-fts.h
+++ b/src/tracker-fts/tracker-fts.h
@@ -11,16 +11,20 @@
******************************************************************************
**
** This header file is used by programs that want to link against the
-** FTS3 library. All it does is declare the sqlite3Fts3Init() interface.
+** FTS3 library.
*/
+
+#ifndef __TRACKER_FTS_H__
+#define __TRACKER_FTS_H__
+
#include <sqlite3.h>
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+int tracker_fts_init (sqlite3 *db);
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_END_DECLS
-int sqlite3Fts3Init(sqlite3 *db);
+#endif /* __TRACKER_FTS_H__ */
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
diff --git a/utils/tracker-fts/tracker-fts-test.c b/utils/tracker-fts/tracker-fts-test.c
index 53f2f8e..949337f 100644
--- a/utils/tracker-fts/tracker-fts-test.c
+++ b/utils/tracker-fts/tracker-fts-test.c
@@ -88,7 +88,7 @@ main (int argc, char **argv)
return EXIT_FAILURE;
}
- if (sqlite3Fts3Init (db) != SQLITE_OK) {
+ if (tracker_fts_init (db) != SQLITE_OK) {
fprintf(stderr, "SQL error\n");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]