qapi: Add Visitor interfaces for uint*_t and int*_t
This adds visitor interfaces for fixed-width integers types. Implementing these in visitors is optional, otherwise we fall back to visit_type_int() (int64_t) with some additional bounds checking to avoid integer overflows for cases where the value fetched exceeds the bounds of our target C type. Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> [LE: exclude negative values in uint*_t Visitor interfaces] Signed-off-by: NLaszlo Ersek <lersek@redhat.com> [AF: Merged fix by Laszlo] Signed-off-by: NAndreas Färber <afaerber@suse.de>
Showing
想要评论请 注册 或 登录