[tracker/wip/carlosg/remote-module-reduction: 7/7] Revert "libtracker-sparql: Ensure to register a single instance of serializers"
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/remote-module-reduction: 7/7] Revert "libtracker-sparql: Ensure to register a single instance of serializers"
- Date: Sun, 24 Apr 2022 11:19:52 +0000 (UTC)
commit 129a65b1cba5fa2c6361c631ebef067151e632a8
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Apr 23 15:12:23 2022 +0200
Revert "libtracker-sparql: Ensure to register a single instance of serializers"
Since all internal tracker library interaction stays within library code and
is no longer done on modules for the HTTP connection/endpoint, we no longer
need these hacks to ensure single registration of types.
This reverts commit 787c4ff6e2132559545475b9dae31eebbe49ff7a.
src/libtracker-sparql/tracker-connection.c | 12 ------------
src/libtracker-sparql/tracker-serializer.c | 16 ++++------------
2 files changed, 4 insertions(+), 24 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-connection.c b/src/libtracker-sparql/tracker-connection.c
index 382492532..f964f44ae 100644
--- a/src/libtracker-sparql/tracker-connection.c
+++ b/src/libtracker-sparql/tracker-connection.c
@@ -60,10 +60,6 @@
#include "tracker-connection.h"
#include "tracker-private.h"
-#include "tracker-serializer-json.h"
-#include "tracker-serializer-trig.h"
-#include "tracker-serializer-turtle.h"
-#include "tracker-serializer-xml.h"
G_DEFINE_ABSTRACT_TYPE (TrackerSparqlConnection, tracker_sparql_connection,
G_TYPE_OBJECT)
@@ -87,14 +83,6 @@ tracker_sparql_connection_class_init (TrackerSparqlConnectionClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = tracker_sparql_connection_dispose;
-
- /* Ensure serializer types, we want all of these initialized before
- * the remote soup 2/3 modules gets to initialize them.
- */
- g_type_ensure (TRACKER_TYPE_SERIALIZER_XML);
- g_type_ensure (TRACKER_TYPE_SERIALIZER_JSON);
- g_type_ensure (TRACKER_TYPE_SERIALIZER_TURTLE);
- g_type_ensure (TRACKER_TYPE_SERIALIZER_TRIG);
}
gboolean
diff --git a/src/libtracker-sparql/tracker-serializer.c b/src/libtracker-sparql/tracker-serializer.c
index 4c343fb58..c5ac3fe54 100644
--- a/src/libtracker-sparql/tracker-serializer.c
+++ b/src/libtracker-sparql/tracker-serializer.c
@@ -135,24 +135,16 @@ tracker_serializer_new (TrackerSparqlCursor *cursor,
switch (format) {
case TRACKER_SERIALIZER_FORMAT_JSON:
- type = g_type_from_name ("TrackerSerializerJson");
- if (type == 0)
- type = TRACKER_TYPE_SERIALIZER_JSON;
+ type = TRACKER_TYPE_SERIALIZER_JSON;
break;
case TRACKER_SERIALIZER_FORMAT_XML:
- type = g_type_from_name ("TrackerSerializerXml");
- if (type == 0)
- type = TRACKER_TYPE_SERIALIZER_XML;
+ type = TRACKER_TYPE_SERIALIZER_XML;
break;
case TRACKER_SERIALIZER_FORMAT_TTL:
- type = g_type_from_name ("TrackerSerializerTurtle");
- if (type == 0)
- type = TRACKER_TYPE_SERIALIZER_TURTLE;
+ type = TRACKER_TYPE_SERIALIZER_TURTLE;
break;
case TRACKER_SERIALIZER_FORMAT_TRIG:
- type = g_type_from_name ("TrackerSerializerTrig");
- if (type == 0)
- type = TRACKER_TYPE_SERIALIZER_TRIG;
+ type = TRACKER_TYPE_SERIALIZER_TRIG;
break;
default:
g_warn_if_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]