Re: ansi-ish fixes for glib, atk, gtk



jacob berkman <jacob ximian com> writes:

> i stumbled upon these when using some more strict flags to gcc.
> 
> ok to commit?

Looks mostly fine except that:

> Index: gtk+/gtk/gtkitemfactory.h
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtkitemfactory.h,v
> retrieving revision 1.27
> diff -u -r1.27 gtkitemfactory.h
> --- gtk+/gtk/gtkitemfactory.h	2002/01/30 03:07:14	1.27
> +++ gtk+/gtk/gtkitemfactory.h	2002/02/09 17:25:22
> @@ -43,7 +43,7 @@
>  					    const gchar		*str);
>  typedef gchar * (*GtkTranslateFunc)	   (const gchar		*path,
>  					    gpointer             func_data);
> -typedef	void	(*GtkItemFactoryCallback)  ();
> +typedef	void	(*GtkItemFactoryCallback)  (void);
>  typedef	void	(*GtkItemFactoryCallback1) (gpointer		 callback_data,
>  					    guint		 callback_action,
>  					    GtkWidget		*widget);

Is an API change. The old API is relying on a deprecated feature of ANSI C
(and a feature not in C++) so it's pretty busted, of course.

We had discussed an (API-incompatible) fix at some point which would
be:
 
 typedef GtkItemFactoryCallback GtkItemFactoryCallback1

But we seemed to have decided against it, either deliberately or
by omission.

Regards,
                                        Owen



 



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