[Libguestfs] [PATCH libnbd] generator: Add SizeT type, maps to C size_t.
Eric Blake
eblake at redhat.com
Thu Oct 1 01:40:52 UTC 2020
On 9/29/20 6:46 AM, Richard W.M. Jones wrote:
> ---
> generator/API.ml | 1 +
> generator/API.mli | 1 +
> generator/C.ml | 14 ++++++++++----
> generator/GoLang.ml | 5 +++++
> generator/OCaml.ml | 5 +++++
> generator/Python.ml | 11 +++++++++--
> 6 files changed, 31 insertions(+), 6 deletions(-)
Looks good, and I'll push a counterpart patch adding RSizeT for
returning ssize_t values.
Question: Should nbd_opt_list() return RSizeT instead of RInt, as it is
returning a count of times the callback was called? The same question
would apply to my upcoming nbd_opt_list_meta_context(). Changing a
return type from 'int' to 'ssize_t' can result in an ABI change (32- vs.
64-bit return on some platforms), which may be too risky, even though
1.4 is still fairly new that we are unlikely to break anyone in practice.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20200930/7e23b89c/attachment.sig>
More information about the Libguestfs
mailing list