[librsvg: 1/29] Remove RSVG_G_TYPE_INIT - we have required glib 2.52 for some time now
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/29] Remove RSVG_G_TYPE_INIT - we have required glib 2.52 for some time now
- Date: Tue, 6 Feb 2018 21:04:10 +0000 (UTC)
commit b935e3426f00d90e9e4c76ba3d798e367175eea2
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Feb 6 07:43:11 2018 -0600
Remove RSVG_G_TYPE_INIT - we have required glib 2.52 for some time now
GType auto-initializes itself since glib 2.36.
Makefile.am | 1 -
gdk-pixbuf-loader/test.c | 4 ----
rsvg-base.c | 9 ++++-----
rsvg-compat.h | 13 -------------
rsvg-convert.c | 3 ---
rsvg-view.c | 4 ----
tests/crash.c | 2 --
tests/dimensions.c | 2 --
tests/loading.c | 2 --
tests/render-crash.c | 2 --
tests/rsvg-test.c | 2 --
tests/styles.c | 2 --
tools/rsvg-dimensions.c | 3 ---
tools/rsvg-tools-main.c | 3 ---
14 files changed, 4 insertions(+), 48 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 08d48ea..db10410 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,7 +33,6 @@ librsvg_@RSVG_API_MAJOR_VERSION@_la_SOURCES = \
rsvg-cairo-render.c \
rsvg-cairo-render.h \
rsvg-cairo.h \
- rsvg-compat.h \
rsvg-cond.c \
rsvg-css.c \
rsvg-css.h \
diff --git a/gdk-pixbuf-loader/test.c b/gdk-pixbuf-loader/test.c
index 06784d5..72a51d1 100644
--- a/gdk-pixbuf-loader/test.c
+++ b/gdk-pixbuf-loader/test.c
@@ -24,8 +24,6 @@
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include "rsvg-compat.h"
-
int
main (int argc, char **argv)
{
@@ -51,8 +49,6 @@ main (int argc, char **argv)
/* Use the locally built rsvg loader, not the system one */
g_setenv ("GDK_PIXBUF_MODULE_FILE", "./gdk-pixbuf.loaders", TRUE);
- RSVG_G_TYPE_INIT;
-
context = g_option_context_new ("- Pixbuf Test Loader");
g_option_context_add_main_entries (context, options_table, NULL);
g_option_context_parse (context, &argc, &argv, &error);
diff --git a/rsvg-base.c b/rsvg-base.c
index c79ce22..2dd383e 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -28,7 +28,6 @@
#define _GNU_SOURCE 1
#include "rsvg-private.h"
-#include "rsvg-compat.h"
#include "rsvg-css.h"
#include "rsvg-styles.h"
#include "rsvg-shapes.h"
@@ -1589,14 +1588,14 @@ rsvg_handle_read_stream_sync (RsvgHandle *handle,
/**
* rsvg_init:
*
- * Initializes librsvg
+ * This function does nothing.
+ *
* Since: 2.9
- * Deprecated: 2.36: Use g_type_init()
+ * Deprecated: 2.36: There is no need to initialize librsvg.
**/
void
rsvg_init (void)
{
- RSVG_G_TYPE_INIT;
}
/**
@@ -1605,7 +1604,7 @@ rsvg_init (void)
* This function does nothing.
*
* Since: 2.9
- * Deprecated: 2.36
+ * Deprecated: 2.36: There is no need to de-initialize librsvg.
**/
void
rsvg_term (void)
diff --git a/rsvg-convert.c b/rsvg-convert.c
index ef4ead6..8fc414c 100644
--- a/rsvg-convert.c
+++ b/rsvg-convert.c
@@ -51,7 +51,6 @@
#include "rsvg-css.h"
#include "rsvg.h"
-#include "rsvg-compat.h"
#include "rsvg-size-callback.h"
#ifdef CAIRO_HAS_PS_SURFACE
@@ -184,8 +183,6 @@ main (int argc, char **argv)
/* Set the locale so that UTF-8 filenames work */
setlocale(LC_ALL, "");
- RSVG_G_TYPE_INIT;
-
g_option_context = g_option_context_new (_("- SVG Converter"));
g_option_context_add_main_entries (g_option_context, options_table, NULL);
g_option_context_set_help_enabled (g_option_context, TRUE);
diff --git a/rsvg-view.c b/rsvg-view.c
index 3616db5..96aa70d 100644
--- a/rsvg-view.c
+++ b/rsvg-view.c
@@ -29,8 +29,6 @@
#include <gtk/gtk.h>
#include <gdk/gdk.h>
-#include "rsvg-compat.h"
-
#if 0 // defined (G_OS_UNIX)
#include <gio/gunixinputstream.h>
#endif
@@ -638,8 +636,6 @@ main (int argc, char **argv)
/* Set the locale so that UTF-8 filenames work */
setlocale(LC_ALL, "");
- RSVG_G_TYPE_INIT;
-
info.window = NULL;
info.popup_menu = NULL;
diff --git a/tests/crash.c b/tests/crash.c
index 2da4f31..e2074f9 100644
--- a/tests/crash.c
+++ b/tests/crash.c
@@ -3,7 +3,6 @@
#include <glib.h>
#include "rsvg.h"
-#include "rsvg-compat.h"
#include "test-utils.h"
static void
@@ -29,7 +28,6 @@ main (int argc, char *argv[])
GFile *base, *crash;
int result;
- RSVG_G_TYPE_INIT;
g_test_init (&argc, &argv, NULL);
if (argc < 2) {
diff --git a/tests/dimensions.c b/tests/dimensions.c
index fceffea..22c23c1 100644
--- a/tests/dimensions.c
+++ b/tests/dimensions.c
@@ -3,7 +3,6 @@
#include <glib.h>
#include "rsvg.h"
-#include "rsvg-compat.h"
#include "test-utils.h"
typedef struct _FixtureData
@@ -61,7 +60,6 @@ main (int argc, char *argv[])
gint i;
int result;
- RSVG_G_TYPE_INIT;
g_test_init (&argc, &argv, NULL);
for (i = 0; i < n_fixtures; i++)
diff --git a/tests/loading.c b/tests/loading.c
index de5218c..4f6c5fb 100644
--- a/tests/loading.c
+++ b/tests/loading.c
@@ -6,7 +6,6 @@
#include <stdio.h>
#include <glib.h>
#include "rsvg.h"
-#include "rsvg-compat.h"
#include "test-utils.h"
typedef struct {
@@ -68,7 +67,6 @@ main (int argc, char **argv)
int result;
int i;
- RSVG_G_TYPE_INIT;
g_test_init (&argc, &argv, NULL);
for (i = 0; i < G_N_ELEMENTS (tests); i++) {
diff --git a/tests/render-crash.c b/tests/render-crash.c
index 6e9678c..bb0e721 100644
--- a/tests/render-crash.c
+++ b/tests/render-crash.c
@@ -2,7 +2,6 @@
#include <glib.h>
#include "rsvg.h"
-#include "rsvg-compat.h"
#include "test-utils.h"
static void
@@ -39,7 +38,6 @@ main (int argc, char *argv[])
GFile *base, *crash;
int result;
- RSVG_G_TYPE_INIT;
g_test_init (&argc, &argv, NULL);
if (argc < 2) {
diff --git a/tests/rsvg-test.c b/tests/rsvg-test.c
index d1ad159..51bab0a 100644
--- a/tests/rsvg-test.c
+++ b/tests/rsvg-test.c
@@ -36,7 +36,6 @@
#include <string.h>
#include "rsvg.h"
-#include "rsvg-compat.h"
#include "test-utils.h"
@@ -360,7 +359,6 @@ main (int argc, char **argv)
{
int result;
- RSVG_G_TYPE_INIT;
g_test_init (&argc, &argv, NULL);
rsvg_set_default_dpi_x_y (72, 72);
diff --git a/tests/styles.c b/tests/styles.c
index 1af4f0b..67ea62e 100644
--- a/tests/styles.c
+++ b/tests/styles.c
@@ -2,7 +2,6 @@
#include <glib.h>
#include "rsvg.h"
-#include "rsvg-compat.h"
#include "rsvg-private.h"
#include "rsvg-defs.h"
#include "rsvg-styles.h"
@@ -115,7 +114,6 @@ main (int argc, char *argv[])
gint i;
int result;
- RSVG_G_TYPE_INIT;
g_test_init (&argc, &argv, NULL);
for (i = 0; i < n_fixtures; i++)
diff --git a/tools/rsvg-dimensions.c b/tools/rsvg-dimensions.c
index 0733ef2..213380f 100644
--- a/tools/rsvg-dimensions.c
+++ b/tools/rsvg-dimensions.c
@@ -9,7 +9,6 @@
#include <stdlib.h>
#include <glib.h>
#include <rsvg.h>
-#include "rsvg-compat.h"
static void
show_help (GOptionContext *context)
@@ -41,8 +40,6 @@ main (int argc,
{ NULL }
};
- RSVG_G_TYPE_INIT;
-
context = NULL;
fragment = NULL;
filenames = NULL;
diff --git a/tools/rsvg-tools-main.c b/tools/rsvg-tools-main.c
index 6b4b505..af57589 100644
--- a/tools/rsvg-tools-main.c
+++ b/tools/rsvg-tools-main.c
@@ -32,7 +32,6 @@
#include "rsvg.h"
#include "rsvg-private.h"
#include "rsvg-tools-main.h"
-#include "rsvg-compat.h"
static gboolean
read_contents (const gchar *file_name, guint8 **contents, gsize *length)
@@ -128,8 +127,6 @@ rsvg_tools_main (int *argc, char ***argv)
exit (EXIT_FAILURE);
}
- RSVG_G_TYPE_INIT;
-
for (j = 0; j < n_args; j++) {
if (!read_contents (args[j], &contents, &length))
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]