Re: [gtk-list] Patch for gtk-1.0.1



James A <jamesa@demon.net> writes:
>  There is a problem with gcc 2.7.2.3 and the patch with doing things
> like... (which should be valid)
> 
> gint    g_snprintf   (gchar *str, gulong n, const gchar const *fmt, ...);

???

	const gchar const *fmt

is the same as saying

	const const gchar *fmt

I don't think `const const' is accepted.  If you meant

	const gchar *const fmt

the second `const' is meaningless in a formal parameter, and is taken to
be `const gchar *fmt' anyway.
 
>  Which was originaly...
> 
> gint    g_snprintf   (gchar *str, gulong n, gchar const *fmt, ...);
> 
>  I only found out about this after I had uploaded the patch. So just
> change them to...
> 
> 
> gint    g_snprintf   (gchar *str, gulong n, const gchar *fmt, ...);

Yep. `gchar const *fmt' and `const gchar *fmt' mean the same thing.  It
is only a matter of style.

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



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