Re: [PATCH] libvirt-domain.h: changing some unsigned int parameters to the respective enum type.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 08, 2015 at 11:47:11PM -0300, Julio Faracco wrote:
> Recently, some code were cleaned ups. Now, some parameters are being
> converted to its respective enum type. For example, there are many functions
> that are using int or unsigned int types instead enum types. So, this kind of
> cleaning up can be necessary.

The size of the enum type is not fixed in the C standard - compilers
are free to use any sized integer to represent it. As such as have
a policy of never using enum types in function parameters, always
unsigned ints.

In addition the 'flags' parameters are not taking individual enum values,
they are taking a bitwise OR of values, so declaring them with the enum
type is simply wrong.


Regards,
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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]