Re: Vimeo plugin
- From: Iago Toral Quiroga <itoral igalia com>
- To: grilo-list gnome org
- Subject: Re: Vimeo plugin
- Date: Thu, 29 Apr 2010 17:34:34 +0200
El jue, 29-04-2010 a las 17:16 +0200, Xabier Rodriguez Calvar escribió:
> O Xov, 29-04-2010 ás 16:40 +0200, Joaquim Rocha escribiu:
> > Hi folks,
> >
> > I am sending you the patch with Xabier's review.
> >
> > I would like to thank him here for the review work.
> > It got indeed better.
> > +static gchar *
> > +get_play_url_from_vimeo_xml (const gchar *xml, gint video_id)
> > +{
> > + xmlDocPtr doc = xmlRecoverDoc ((xmlChar *) xml);
> > + xmlXPathContextPtr context = xmlXPathNewContext (doc);
> > + gchar *request_signature = get_node_text (context,
> > + "/xml/request_signature[1]");
> > + gchar *signature_expires = get_node_text (context,
> > + "/xml/request_signature_expires[1]");
> > +
> > + gchar *url = g_strdup_printf ("%s%d/%s/%s/?q=sd",
> > + VIMEO_VIDEO_PLAY_URL,
> > + video_id,
> > + request_signature,
> > + signature_expires);
>
> Something I didn't like the first and the second time, but I didn't
> complain before was this. I don't like declaring a variable by assigning
> the value of a function, and then using this value to declare another
> variable with another function call. It is like a subset of declaring
> variables where you want. I think this does not help to much to
> readability.
>
> What do other think about this?
I don't have a strong opinion, but in general, I prefer not to do that:
define the variables first, then give values to them.
Iago
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]