mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-02 19:31:18 +00:00
b65f37a4a1
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> |
||
---|---|---|
.. | ||
libvirtd_lxc.aug | ||
lxc_conf.c | ||
lxc_conf.h | ||
lxc_container.c | ||
lxc_container.h | ||
lxc_controller.c | ||
lxc_driver.c | ||
lxc_driver.h | ||
lxc.conf | ||
test_libvirtd_lxc.aug | ||
veth.c | ||
veth.h |