[geany/geany] 16020d: Add cast to `GtkWidget*` to match previous behaviour

Matthew Brush git-noreply at xxxxx
Fri Jan 26 16:13:41 UTC 2018


Branch:      refs/heads/master
Author:      Matthew Brush <matt at geany.org>
Committer:   Thomas Martitz <kugel at rockbox.org>
Date:        Fri, 26 Jan 2018 16:13:41 UTC
Commit:      16020ddc6cd32a3aa121b89edc8aeb6a45e78775
             https://github.com/geany/geany/commit/16020ddc6cd32a3aa121b89edc8aeb6a45e78775

Log Message:
-----------
Add cast to `GtkWidget*` to match previous behaviour

This fixes minor problem which affected C++ plugins since
3e649dddef93723ebc2487d30023fc5f62d894ca where they would have to add
a the cast themselves.


Modified Paths:
--------------
    src/gtkcompat.h

Modified: src/gtkcompat.h
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -74,11 +74,11 @@ G_BEGIN_DECLS
 #if GTK_CHECK_VERSION(3, 0, 0)
 /* Gtk[VH]Box */
 #	define compat_gtk_box_new(orientation, homogeneous, spacing) \
-		g_object_new(GTK_TYPE_BOX, \
+		((GtkWidget *)g_object_new(GTK_TYPE_BOX, \
 					 "orientation", (orientation), \
 					 "homogeneous", (homogeneous), \
 					 "spacing", (spacing), \
-					 NULL)
+					 NULL))
 #	define gtk_vbox_new(homogeneous, spacing) \
 		compat_gtk_box_new(GTK_ORIENTATION_VERTICAL, (homogeneous), (spacing))
 #	define gtk_hbox_new(homogeneous, spacing) \



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list