1. Akira TAGOH
  2. libgxim

Commits

Akira TAGOH  committed 7a9aae3

Fix deprecated warnings from glib

  • Participants
  • Parent commits bd9356d
  • Branches master

Comments (0)

Files changed (6)

File libgxim/gximclconn.c

View file
 	GXimProtocol *proto;
 	gboolean retval;
 	GError *error = NULL;
-	GValueArray *e;
+	GArray *e;
 	GSList *l;
 
 	g_return_val_if_fail (G_IS_XIM_CLIENT_CONNECTION (conn), FALSE);
 
 	if ((e = G_XIM_CONNECTION (conn)->encodings))
-		g_value_array_free(e);
+		g_array_unref(e);
 	if ((e = G_XIM_CONNECTION (conn)->encoding_details))
-		g_value_array_free(e);
-	e = G_XIM_CONNECTION (conn)->encodings = g_value_array_new(g_slist_length(encodings));
+		g_array_unref(e);
+	e = G_XIM_CONNECTION (conn)->encodings = g_array_new(TRUE, TRUE, g_slist_length(encodings));
 	for (l = encodings; l != NULL; l = g_slist_next(l)) {
 		GValue v = { 0, };
 
 		g_value_init(&v, G_TYPE_XIM_STR);
 		g_value_set_boxed(&v, l->data);
-		g_value_array_append(e, &v);
+		g_array_append_vals(e, &v, 1);
 	}
-	e = G_XIM_CONNECTION (conn)->encoding_details = g_value_array_new(g_slist_length(details));
+	e = G_XIM_CONNECTION (conn)->encoding_details = g_array_new(TRUE, TRUE, g_slist_length(details));
 	for (l = details; l != NULL; l = g_slist_next(l)) {
 		GValue v = { 0, };
 
 		g_value_init(&v, G_TYPE_XIM_ENCODINGINFO);
 		g_value_set_boxed(&v, l->data);
-		g_value_array_append(e, &v);
+		g_array_append_vals(e, &v, 1);
 	}
 
 	proto = G_XIM_PROTOCOL (conn);

File libgxim/gximconnection.c

View file
 	if (conn->default_icattr)
 		g_object_unref(conn->default_icattr);
 	if (conn->encodings)
-		g_value_array_free(conn->encodings);
+		g_array_unref(conn->encodings);
 	if (conn->encoding_details)
-		g_value_array_free(conn->encoding_details);
+		g_array_unref(conn->encoding_details);
 
 	g_xim_protocol_finalize(object);
 	g_xim_transport_finalize(G_XIM_TRANSPORT (object));

File libgxim/gximconnection.h

View file
 	GObject      parent_instance;
 
 	/*< private >*/
-	GSList      *proto_signals;
-	guint16      imid;
-	GXimIMAttr  *imattr;
-	GXimICAttr  *default_icattr;
-	GValueArray *encodings;
-	GValueArray *encoding_details;
-	guint16      encoding_category;
-	gint16       encoding_index;
+	GSList     *proto_signals;
+	guint16     imid;
+	GXimIMAttr *imattr;
+	GXimICAttr *default_icattr;
+	GArray     *encodings;
+	GArray     *encoding_details;
+	guint16     encoding_category;
+	gint16      encoding_index;
 
 	void (* reserved1) (void);
 	void (* reserved2) (void);

File libgxim/gximmessages.c

View file
 {
 	GXimMessagesPrivate *priv = G_XIM_MESSAGES_GET_PRIVATE (message);
 
-	if (!g_threads_got_initialized)
-		g_thread_init(NULL);
-
 	message->priv = priv;
 	priv->filename = NULL;
 	priv->activate = FALSE;

File libgxim/gximprotocol.c

View file
 			    g_value_set_boolean(&pv[i + 1], va_arg(ap, gboolean));
 			    break;
 		    case G_TYPE_CHAR:
-			    g_value_set_char(&pv[i + 1], va_arg(ap, gint));
+			    g_value_set_schar(&pv[i + 1], va_arg(ap, gint));
 			    break;
 		    case G_TYPE_UCHAR:
 			    g_value_set_uchar(&pv[i + 1], va_arg(ap, guint));

File requires

View file
 CHECK_REQUIRED=0.9.4
 GDK_REQUIRED=2.2.0
-GLIB_REQUIRED=2.16.0
+GLIB_REQUIRED=2.32.0
 GIO_REQUIRED=2.26.0
-GOBJECT_REQUIRED=2.16.0
-GTHREAD_REQUIRED=2.16.0
+GOBJECT_REQUIRED=2.32.0
+GTHREAD_REQUIRED=2.32.0
 GTKDOC_REQUIRED=1.8