Remove RSVG_G_TYPE_INIT - we have required glib 2.52 for some time now

GType auto-initializes itself since glib 2.36.
parent 562e00a6
......@@ -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 \
......
......@@ -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);
......
......@@ -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)
......
/* rsvg-compat.h: miscellaneous compatibility functions to deal with deprecations in the platform */
#ifndef RSVG_COMPAT_H
#define RSVG_COMPAT_H
/* g_type_init() was deprecated in glib 2.36.0 */
#if !GLIB_CHECK_VERSION (2, 36, 0)
# define RSVG_G_TYPE_INIT g_type_init ()
#else
# define RSVG_G_TYPE_INIT {}
#endif
#endif /* RSVG_COMPAT_H */
......@@ -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);
......
......@@ -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;
......
......@@ -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) {
......
......@@ -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++)
......
......@@ -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++) {
......
......@@ -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) {
......
......@@ -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);
......
......@@ -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++)
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment