Re: [patch] Make the volume argument const in most functions of gnome-vfs-volume.[ch]
- From: Vincent Untz <vuntz gnome org>
- To: Alexander Larsson <alexl redhat com>
- Cc: gnome-vfs-list gnome org
- Subject: Re: [patch] Make the volume argument const in most functions of gnome-vfs-volume.[ch]
- Date: Sat, 19 Nov 2005 15:42:42 +0100
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]