[Workman-devel] [PATCH] WorkmanAttribute: don't store format separately
Daniel P. Berrange
berrange at redhat.com
Tue Mar 5 14:10:11 UTC 2013
On Tue, Mar 05, 2013 at 08:07:54AM -0600, Josh Poimboeuf wrote:
> On 03/05/2013 04:26 AM, Daniel P. Berrange wrote:
> >On Mon, Mar 04, 2013 at 05:27:04PM -0600, Josh Poimboeuf wrote:
> >>- The format string, or type, of a GVariant is inherent and can be
> >> retrieved from the GVariant itself via g_variant_get_type(), so
> >> there's no need to specify it separately.
> >
> >Hmm, but what about if we have an attribute which does not currently
> >have any value set. ie the GVariant is NULL. We want to represent
> >the attribute and have its format for validation purposes still.
>
> The attribute objects will only be created by the plugin objects and
> will never have a NULL GVariant. I can add a check to
> workman_attribute_new() to ensure that.
Hmm, I guess if we need to represent an attribute with no default value
set, then we'd be able to use a GVariant with a "maybe" type instead of
a NULL GVariant.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the Workman-devel
mailing list