--- kgsueme/gtk2-perl-xs.patch 2003/06/01 20:12:10 1.3 +++ kgsueme/gtk2-perl-xs.patch 2003/06/02 14:33:20 1.4 @@ -1,111 +1,17 @@ Gtk2 - * xs/GtkAspectFrame.xs: fixed package name typo. - * xs/GtkAspectFrame.xs: renamed ->set to set_param, because ->set is more - universal. - * xs/GtkTreeSortable.xs: fixed package name typo. * xs/GtkAdjustment.xs: add accors/mutators for struct values. Glib * gperl.h: make it compile even on non-threaded perls (where aTHX is empty). - * GObject.xs: ->set and ->get accept more than one property pair/name. -Index: Makefile -=================================================================== -RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Makefile,v -retrieving revision 1.2 -diff -u -p -r1.2 Makefile ---- Makefile 17 May 2003 21:28:05 -0000 1.2 -+++ Makefile 1 Jun 2003 20:11:52 -0000 -@@ -16,7 +16,7 @@ - # non-system installed version. If you have any questions send them to the - # mailing list -rm - --PREFIX=/usr/local -+PREFIX=//opt/perl - - TARGETS=Glib/Makefile Glib.build - TARGETS+=Gtk2/Makefile Gtk2.build -Index: Glib/GObject.xs -=================================================================== -RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GObject.xs,v -retrieving revision 1.2 -diff -u -p -r1.2 GObject.xs ---- Glib/GObject.xs 22 May 2003 14:23:11 -0000 1.2 -+++ Glib/GObject.xs 1 Jun 2003 20:11:53 -0000 -@@ -390,37 +390,49 @@ g_object_get_data (object, key) - - - SV * --g_object_get (object, name) -+g_object_get (object, ...) - GObject * object -- char * name - ALIAS: - Glib::Object::get = 0 - Glib::Object::get_property = 1 - PREINIT: - GValue value = {0,}; -- CODE: -- init_property_value (object, name, &value); -- g_object_get_property (object, name, &value); -- RETVAL = gperl_sv_from_value (&value); -- g_value_unset (&value); -- OUTPUT: -- RETVAL -+ PPCODE: -+ int i; -+ -+ EXTEND (SP, items); -+ for (i = 1; i < items; i++) { -+ char *name = SvPV_nolen (ST (i)); -+ -+ init_property_value (object, name, &value); -+ g_object_get_property (object, name, &value); -+ PUSHs (sv_2mortal (gperl_sv_from_value (&value))); -+ g_value_unset (&value); -+ } - - void --g_object_set (object, name, newval) -+g_object_set (object, ...) - GObject * object -- char * name -- SV * newval - ALIAS: - Glib::Object::set = 0 - Glib::Object::set_property = 1 - PREINIT: - GValue value = {0,}; - CODE: -- init_property_value (object, name, &value); -- gperl_value_from_sv (&value, newval); -- g_object_set_property (object, name, &value); -- g_value_unset (&value); -+ int i; -+ -+ if (!(items % 2)) -+ croak ("set method expects name => value pairs (off number of arguments detected)"); -+ -+ for (i = 1; i < items; i += 2) { -+ char *name = SvPV_nolen (ST (i)); -+ SV *newval = ST (i + 1); -+ -+ init_property_value (object, name, &value); -+ gperl_value_from_sv (&value, newval); -+ g_object_set_property (object, name, &value); -+ g_value_unset (&value); -+ } - - - void Index: Glib/gperl.h =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/gperl.h,v retrieving revision 1.4 diff -u -p -r1.4 gperl.h --- Glib/gperl.h 31 May 2003 04:00:45 -0000 1.4 -+++ Glib/gperl.h 1 Jun 2003 20:11:54 -0000 ++++ Glib/gperl.h 2 Jun 2003 14:32:11 -0000 @@ -28,6 +28,11 @@ #include @@ -124,7 +30,7 @@ retrieving revision 1.3 diff -u -p -r1.3 GtkAdjustment.xs --- Gtk2/xs/GtkAdjustment.xs 22 May 2003 14:23:23 -0000 1.3 -+++ Gtk2/xs/GtkAdjustment.xs 1 Jun 2003 20:11:54 -0000 ++++ Gtk2/xs/GtkAdjustment.xs 2 Jun 2003 14:32:11 -0000 @@ -58,3 +58,35 @@ gtk_adjustment_set_value (adjustment, va GtkAdjustment *adjustment gdouble value @@ -161,47 +67,3 @@ + OUTPUT: + RETVAL + -Index: Gtk2/xs/GtkAspectFrame.xs -=================================================================== -RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkAspectFrame.xs,v -retrieving revision 1.3 -diff -u -p -r1.3 GtkAspectFrame.xs ---- Gtk2/xs/GtkAspectFrame.xs 22 May 2003 14:23:23 -0000 1.3 -+++ Gtk2/xs/GtkAspectFrame.xs 1 Jun 2003 20:11:54 -0000 -@@ -21,7 +21,7 @@ - - #include "gtk2perl.h" - --MODULE = Gtk2::AspectFrame PACKAGE = Gtk2::AspectFrame PREFIX = gtk_aspectframe_ -+MODULE = Gtk2::AspectFrame PACKAGE = Gtk2::AspectFrame PREFIX = gtk_aspect_frame_ - - ## GtkWidget* gtk_aspect_frame_new (const gchar *label, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child) - GtkWidget * -@@ -35,9 +35,10 @@ gtk_aspect_frame_new (class, label, xali - C_ARGS: - label, xalign, yalign, ratio, obey_child - -+# renamed to set_params because the existing ->set method is more important - ## void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child) - void --gtk_aspect_frame_set (aspect_frame, xalign, yalign, ratio, obey_child) -+gtk_aspect_frame_set_params (aspect_frame, xalign, yalign, ratio, obey_child) - GtkAspectFrame * aspect_frame - gfloat xalign - gfloat yalign -Index: Gtk2/xs/GtkTreeSortable.xs -=================================================================== -RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkTreeSortable.xs,v -retrieving revision 1.3 -diff -u -p -r1.3 GtkTreeSortable.xs ---- Gtk2/xs/GtkTreeSortable.xs 22 May 2003 14:23:24 -0000 1.3 -+++ Gtk2/xs/GtkTreeSortable.xs 1 Jun 2003 20:11:54 -0000 -@@ -23,7 +23,7 @@ - - // typedef gint (* GtkTreeIterCompareFunc) (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) - --MODULE = Gtk2::TreeSortable PACKAGE = Gtk2::TreeSortable PREFIX = gtk_tre_sortable_ -+MODULE = Gtk2::TreeSortable PACKAGE = Gtk2::TreeSortable PREFIX = gtk_tree_sortable_ - - ## void gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable) - void