Re: [patch] Make the volume argument const in most functions of gnome-vfs-volume.[ch]



On lun, 2005-10-31 at 09:14 +0100, Alexander Larsson wrote:
> On Sun, 2005-10-30 at 10:12 +0100, Vincent Untz wrote:
> > Hi,
> > 
> > The attached patch makes the volume argument const in most functions of
> > gnome-vfs-volume.[ch]
> > 
> > This doesn't break the API, however if applied, it won't be possible to
> > revert it without breaking the API.
> > 
> > This fixes some warnings in applications.
> 
> How did the application ever get a const volume object? Does any of our
> API return that?

No, it's because the objects are in a list that's being sorted with a
GCompareFunc, which takes const arguments.

> Its a bit weird to have a const GObject, because none of the GObject
> methods take const objects, so you can't use it for much. Ref/unref
> takes non-const args, so you can't even memory manage them.

Nod. I'll probably do some casts, then.

Vincent

-- 
Les gens heureux ne sont pas press�




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