[Libguestfs] [libnbd PATCH v2 0/3] Improve type-safety of ocaml/golang getters

Eric Blake eblake at redhat.com
Mon Sep 7 21:45:33 UTC 2020


Well, the golang changes (patch 1 and 2/3 of v1) were already
committed, all that was left was the OCaml changes.  I'm a lot happier
with how things turned out with an UNKNOWN constructor in the OCaml
variants.

Eric Blake (3):
  tests: Enhance coverage of enum/flag range checking
  ocaml: Support unknown values for Enum/Flags
  ocaml: Typesafe returns for REnum/RFlags

 generator/OCaml.ml                            | 123 +++++++++++++++---
 python/t/120-set-non-defaults.py              |  12 ++
 ocaml/tests/test_110_defaults.ml              |   5 +-
 ocaml/tests/test_120_set_non_defaults.ml      |  19 ++-
 tests/errors.c                                |  32 +++++
 .../libnbd_120_set_non_defaults_test.go       |  28 +++-
 6 files changed, 194 insertions(+), 25 deletions(-)

-- 
2.28.0




More information about the Libguestfs mailing list