[perl-Gtk2] Avoid accessing private struct members directly



commit fd3af634a90333856206d05e8145a822f9ee2fae
Author: Kevin Ryde <user42 zip com au>
Date:   Wed Nov 24 08:51:36 2010 +1100

    Avoid accessing private struct members directly
    
    Use gtk_radio_button_get_group() and gtk_radio_menu_item_get_group() instead of
    direct access to widget->group instance struct fields.  The Gtk reference
    manual says the struct fields are supposed to be private.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=635648

 xs/GtkRadioButton.xs   |    2 +-
 xs/GtkRadioMenuItem.xs |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/xs/GtkRadioButton.xs b/xs/GtkRadioButton.xs
index 6cd0a21..8ef37a5 100644
--- a/xs/GtkRadioButton.xs
+++ b/xs/GtkRadioButton.xs
@@ -187,7 +187,7 @@ gtk_radio_button_get_group (radio_button)
 	GSList * group;
 	GSList * i;
     CODE:
-	group = radio_button->group;
+	group = gtk_radio_button_get_group (radio_button);
 	RETVAL = newAV();
 	sv_2mortal ((SV*) RETVAL);  /* typemap expects RETVAL mortalized */
 	for( i = group; i ; i = i->next )
diff --git a/xs/GtkRadioMenuItem.xs b/xs/GtkRadioMenuItem.xs
index 3edb4ed..befa3b6 100644
--- a/xs/GtkRadioMenuItem.xs
+++ b/xs/GtkRadioMenuItem.xs
@@ -94,7 +94,7 @@ gtk_radio_menu_item_get_group (radio_menu_item)
 	GSList * group;
 	GSList * i;
     CODE:
-	group = radio_menu_item->group;
+	group = gtk_radio_menu_item_get_group (radio_menu_item);
 	RETVAL = newAV();
 	sv_2mortal ((SV*) RETVAL);  /* typemap expects RETVAL mortalized */
 	for( i = group; i ; i = i->next )



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]