[virt-tools-list] [PATCH 1/3] Change install script output (tool)

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Thu Aug 9 13:20:41 UTC 2012


On Thu, Aug 9, 2012 at 1:01 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
>
> This patch is labelled 1 of 3, but the other 2 patches don't appear
> on the list. Something went missing, or wrong subject line ?
>
> On Thu, Aug 02, 2012 at 06:39:08PM +0200, Fabiano Fidêncio wrote:
>> +void osinfo_install_script_set_output_prefix(OsinfoInstallScript *script,
>> +                                             const gchar *prefix)
>> +{
>> +    GValue value = G_VALUE_INIT;
>> +    g_value_init(&value, G_TYPE_STRING);
>> +    g_value_set_string(&value, prefix);
>> +
>> +    osinfo_os_set_property(G_OBJECT (script),
>> +                           PROP_OUTPUT_PREFIX,
>> +                           &value,
>> +                           NULL);
>
> Eww, no don't call this internal helper API - just use the regular
> GOBject APIs for this, avoiding the GValue horror.
>
>    g_object_set(script, PROP_OUTPUT_PREFIX, prefix, NULL);

Actually that will create infinite mutual recursion. He should be
simply setting the prefix directly as I suggested in my review.


-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the virt-tools-list mailing list