Merge branch 'jjardon/no_G_TYPE_INSTANCE_GET_PRIVATE' into 'master'

Stop using G_TYPE_INSTANCE_GET_PRIVATE completely

See merge request GNOME/gtk!402
This commit is contained in:
Timm Bäder 2018-11-15 09:59:01 +00:00
commit 55faaf1aa1
2 changed files with 4 additions and 2 deletions

View File

@ -146,8 +146,6 @@
#define SPACE_FOR_CURSOR 1
#define CURSOR_ASPECT_RATIO (0.04)
#define GTK_TEXT_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TEXT_VIEW, GtkTextViewPrivate))
typedef struct _GtkTextWindow GtkTextWindow;
typedef struct _GtkTextPendingScroll GtkTextPendingScroll;

View File

@ -279,6 +279,10 @@ gtk_tool_button_init (GtkToolButton *button,
{
GtkToolItem *toolitem = GTK_TOOL_ITEM (button);
/* We still need to use G_TYPE_INSTANCE_GET_PRIVATE() because GtkToolButton
need to access the class pointer inside instance_init
See a detailed explanation of this at
https://gitlab.gnome.org/GNOME/gtk/merge_requests/402#note_361210 */
button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
GTK_TYPE_TOOL_BUTTON,
GtkToolButtonPrivate);