mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
util: TristateBool and TristateSwitch are interchangeable
It may be useful in some cases to call TristateSwitch helper with TristateBool. Document that enum values equivalency in the code. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
85a687c6b2
commit
ef766337ff
@ -236,10 +236,15 @@ typedef enum {
|
||||
VIR_TRISTATE_SWITCH_LAST
|
||||
} virTristateSwitch;
|
||||
|
||||
|
||||
VIR_ENUM_DECL(virTristateBool)
|
||||
VIR_ENUM_DECL(virTristateSwitch)
|
||||
|
||||
/* the two enums must be in sync to be able to use helpers interchangeably in
|
||||
* some special cases */
|
||||
verify((int)VIR_TRISTATE_BOOL_YES == (int)VIR_TRISTATE_SWITCH_ON);
|
||||
verify((int)VIR_TRISTATE_BOOL_NO == (int)VIR_TRISTATE_SWITCH_OFF);
|
||||
verify((int)VIR_TRISTATE_BOOL_ABSENT == (int)VIR_TRISTATE_SWITCH_ABSENT);
|
||||
|
||||
unsigned int virGetListenFDs(void);
|
||||
|
||||
long virGetSystemPageSize(void);
|
||||
|
Loading…
Reference in New Issue
Block a user