diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-07-04 11:23:28 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-07-04 11:26:35 +0200 |
commit | 541cac06693294fef0c4087e3c08bd850e46ef3f (patch) | |
tree | 0826f8b7fa5d470a583323f64fa8ede9d38963f2 /src/libtracker-common | |
parent | e96ad8d8c7a4b7c4d0b126a43576a1d2746128a6 (diff) | |
download | tracker-541cac06693294fef0c4087e3c08bd850e46ef3f.tar.gz |
libtracker-common: Drop unused enum
And GType boilerplate generation. This enum is entirely unused
in the tracker code and is thus unneeded.
Diffstat (limited to 'src/libtracker-common')
-rw-r--r-- | src/libtracker-common/.gitignore | 1 | ||||
-rw-r--r-- | src/libtracker-common/meson.build | 12 | ||||
-rw-r--r-- | src/libtracker-common/tracker-common.h | 1 | ||||
-rw-r--r-- | src/libtracker-common/tracker-enum-types.c.template | 44 | ||||
-rw-r--r-- | src/libtracker-common/tracker-enum-types.h.template | 26 | ||||
-rw-r--r-- | src/libtracker-common/tracker-enums.h | 38 |
6 files changed, 0 insertions, 122 deletions
diff --git a/src/libtracker-common/.gitignore b/src/libtracker-common/.gitignore index 6b4eece96..2475fb8e2 100644 --- a/src/libtracker-common/.gitignore +++ b/src/libtracker-common/.gitignore @@ -1,4 +1,3 @@ tracker-turtle-writer.c tracker-turtle-writer.h -tracker-enum-types.[c|h] tracker-parser-sha1.h diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build index aff153637..9ea3d660d 100644 --- a/src/libtracker-common/meson.build +++ b/src/libtracker-common/meson.build @@ -1,15 +1,5 @@ subdir('stop-words') -tracker_common_enums_header = files('tracker-enums.h') - -enums = gnome.mkenums('tracker-enum-types', - sources: tracker_common_enums_header, - c_template: 'tracker-enum-types.c.template', - h_template: 'tracker-enum-types.h.template', -) - -tracker_common_enum_header = enums[1] - tracker_common_sources = [ 'tracker-date-time.c', 'tracker-debug.c', @@ -19,7 +9,6 @@ tracker_common_sources = [ 'tracker-locale.c', 'tracker-parser-utils.c', 'tracker-language.c', - enums[0], enums[1], ] if unicode_library_name == 'icu' @@ -46,7 +35,6 @@ libtracker_common = static_library('tracker-common', commoninc = include_directories('.') tracker_common_dep = declare_dependency( - sources: [tracker_common_enum_header], link_with: libtracker_common, dependencies: tracker_common_dependencies, include_directories: [configinc, srcinc, commoninc], diff --git a/src/libtracker-common/tracker-common.h b/src/libtracker-common/tracker-common.h index 5bc03c9bf..e572b6ebc 100644 --- a/src/libtracker-common/tracker-common.h +++ b/src/libtracker-common/tracker-common.h @@ -36,7 +36,6 @@ #include "tracker-term-utils.h" #include "tracker-utils.h" #include "tracker-locale.h" -#include "tracker-enum-types.h" #undef __LIBTRACKER_COMMON_INSIDE__ diff --git a/src/libtracker-common/tracker-enum-types.c.template b/src/libtracker-common/tracker-enum-types.c.template deleted file mode 100644 index 097a659be..000000000 --- a/src/libtracker-common/tracker-enum-types.c.template +++ /dev/null @@ -1,44 +0,0 @@ -/*** BEGIN file-header ***/ -#include <config.h> - -#include "tracker-enum-types.h" - -/*** END file-header ***/ - -/*** BEGIN file-production ***/ -/* enumerations from "@basename@" */ -#include "@filename@" -/*** END file-production ***/ - - -/*** BEGIN value-header ***/ -GType -@enum_name@_get_type (void) -{ - static gsize g_define_type_id = 0; - - if (g_once_init_enter (&g_define_type_id)) { - static const G@Type@Value values[] = { -/*** END value-header ***/ - -/*** BEGIN value-production ***/ - { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, -/*** END value-production ***/ - -/*** BEGIN value-tail ***/ - { 0, NULL, NULL } - }; - GType type = - g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); - - g_once_init_leave (&g_define_type_id, type); - } - - return g_define_type_id; -} - -/*** END value-tail ***/ - -/*** BEGIN file-tail ***/ - -/*** END file-tail ***/ diff --git a/src/libtracker-common/tracker-enum-types.h.template b/src/libtracker-common/tracker-enum-types.h.template deleted file mode 100644 index a909a294c..000000000 --- a/src/libtracker-common/tracker-enum-types.h.template +++ /dev/null @@ -1,26 +0,0 @@ -/*** BEGIN file-header ***/ - -#ifndef __TRACKER_ENUMS_TYPES_H__ -#define __TRACKER_ENUMS_TYPES_H__ - -#include <glib-object.h> -#include "tracker-enums.h" - -G_BEGIN_DECLS -/*** END file-header ***/ - -/*** BEGIN file-production ***/ - -/* enumerations from "@basename@" */ -/*** END file-production ***/ - -/*** BEGIN value-header ***/ -GType @enum_name@_get_type (void) G_GNUC_CONST; -#define TRACKER_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) -/*** END value-header ***/ - -/*** BEGIN file-tail ***/ -G_END_DECLS - -#endif /* __TRACKER_ENUMS_TYPES_H__ */ -/*** END file-tail ***/ diff --git a/src/libtracker-common/tracker-enums.h b/src/libtracker-common/tracker-enums.h deleted file mode 100644 index d54b97b90..000000000 --- a/src/libtracker-common/tracker-enums.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2011, Nokia <ivan.frade@nokia.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __TRACKER_ENUMS_H__ -#define __TRACKER_ENUMS_H__ - -G_BEGIN_DECLS - -typedef enum { - TRACKER_SERIALIZATION_FORMAT_SPARQL, - TRACKER_SERIALIZATION_FORMAT_TURTLE, - /* JSON and JSON_LD are treated as the same thing right now, but we could - * treat them differently if we wanted. also it's nice to be able to pass - * both 'json' and 'json-ld' to `tracker extract --output-format=`. - */ - TRACKER_SERIALIZATION_FORMAT_JSON, - TRACKER_SERIALIZATION_FORMAT_JSON_LD, -} TrackerSerializationFormat; - -G_END_DECLS - -#endif /* __TRACKER_ENUMS_H__ */ |