On Fri, Dec 21, 2012 at 02:21:57AM +0200, Zeeshan Ali (Khattak) wrote: > > diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c > > index 4c42746..e61bfb6 100644 > > --- a/osinfo/osinfo_install_config.c > > +++ b/osinfo/osinfo_install_config.c > > @@ -189,9 +189,39 @@ osinfo_install_config_init (OsinfoInstallConfig *config) > > */ > > OsinfoInstallConfig *osinfo_install_config_new(const gchar *id) > > { > > - return g_object_new(OSINFO_TYPE_INSTALL_CONFIG, > > - "id", id, > > - NULL); > > + return osinfo_install_config_new_for_script(id, NULL); > > +} > > + > > + > > +/** > > + * osinfo_install_config_new_for_script: > > + * @id: the unique identifier > > + * @script: the #OsinfoInstallScript we are creating the configuration for > > + * > > + * Construct a new install configuration associated with @script. > > + * OsinfoInstallConfig:config-params will contain the > > + * #OsinfoInstallConfigParamList describing the parameters that can be set > > + * on the config object when creating a configuration for @script. See > > + * osinfo_install_config_new() for a description of the default values that > > + * will be set on the newly created #OsinfoInstallConfig. > > + * > > + * Returns: (transfer full): an install configuration > > + */ > > +OsinfoInstallConfig *osinfo_install_config_new_for_script(const gchar *id, > > + OsinfoInstallScript *script) > > +{ > > + OsinfoInstallConfigParamList *params = NULL; > > + OsinfoInstallConfig *config; > > + > > + if (script != NULL) > > + params = osinfo_install_script_get_config_params(script); > > + > > I don't think it makes sense to have script argument nullable here but > no strong feelings. If you disagree, you want to add gir annotation in > the doc comment. Either way, you can just change it before pushing. osinfo_install_config_new is calling it with a NULL script. Given that without that call, it's a one-liner, I'll change the code to forbid NULL scripts. Christophe > > -- > Regards, > > Zeeshan Ali (Khattak) > FSF member#5124
Attachment:
pgpt4u0KBUPxF.pgp
Description: PGP signature
_______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo