[Libvir] [PATCH] [RUBY-LIBVIRT]: Make the flags parameter optional

Chris Lalancette clalance at redhat.com
Tue Apr 1 22:54:34 UTC 2008


All,
     While using the ruby-libvirt bindings, I usually end up setting the "flags"
parameter to various calls to 0.  While this is required by the C side of
things, for Ruby we have no such constraint; we can have methods with optional
arguments.  Since most of the time we will be passing "flags" as 0, we will just
assume 0 if it isn't specified, and actually use the value in flags if it is.
The attached patch does just that.  Note that I've only tested about half of the
calls in here; further breakage should be easy to find and fix.  Also note that
this should not impact existing users, since we will honor the flags they are
already passing.

Signed-off-by: Chris Lalancette <clalance at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ruby-libvirt-optional-args.patch
Type: text/x-patch
Size: 14077 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080401/096ed570/attachment-0001.bin>


More information about the libvir-list mailing list