Re: [PATCH 4/4] vdagent: Use glib's commandline parser

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

 



Hi,

On Tue, May 16, 2017 at 06:27:54PM +0200, Christophe Fergeau wrote:
> On Tue, May 16, 2017 at 06:07:00PM +0200, Victor Toso wrote:
> > Hi,
> > 
> > On Tue, May 16, 2017 at 05:29:57PM +0200, Christophe Fergeau wrote:
> > > On Fri, May 12, 2017 at 01:19:40PM +0200, Victor Toso wrote:
> > > > From: Victor Toso <me@xxxxxxxxxxxxxx>
> > > > 
> > > > As we already depend on glib, let's remove code that glib can take
> > > > care. In this case, we don't need to handle commandline parsing
> > > > ourselves.
> > > > 
> > > > In regard the global variables:
> > > > 
> > > > * static const char * -> static char * [only paths]
> > >
> > > Ideally, they would need to be g_free'd at some point, dunno if you
> > > have looked at doing that, but it was inconvenient, or if this was
> > > forgotten?
> > 
> > tbh, I thought GOptionEntry wouldn't take a const gchar *. I'll move it
> > to const again.
>
> I don't think it would accept a const gchar *, see
> https://developer.gnome.org/glib/stable/glib-Commandline-option-parser.html#GOptionEntry
> « If arg type is G_OPTION_ARG_STRING or G_OPTION_ARG_FILENAME, the
> location will contain a newly allocated string if the option was given.
> That string needs to be freed by the callee using g_free(). »
>
> Christophe

Ah, yes. I remember that I checked this. Good!
I'll include the g_free() in the end.

Thanks again,

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]