Make the args a flexible array inside the struct, and allocate them

2005-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbindings.h (GtkBindingSignal):
	* gtk/gtkbindings.c (binding_signal_new): Make the
	args a flexible array inside the struct, and allocate them
	together.
This commit is contained in:
Matthias Clasen
2005-12-28 04:09:18 +00:00
committed by Matthias Clasen
parent c70c8cf69a
commit c63a3dccab
4 changed files with 23 additions and 12 deletions

View File

@ -74,14 +74,6 @@ struct _GtkBindingEntry
GtkBindingSignal *signals;
};
struct _GtkBindingSignal
{
GtkBindingSignal *next;
gchar *signal_name;
guint n_args;
GtkBindingArg *args;
};
struct _GtkBindingArg
{
GType arg_type;
@ -92,6 +84,13 @@ struct _GtkBindingArg
} d;
};
struct _GtkBindingSignal
{
GtkBindingSignal *next;
gchar *signal_name;
guint n_args;
GtkBindingArg args[1]; /* flexible array */
};
/* Application-level methods */