Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516
Repo:     https://gitlab.com/lersek/libnbd.git
Branch:   wrap-2172516-wave4

This series is a continuation of the one noted in
<https://bugzilla.redhat.com/show_bug.cgi?id=2172516#c15>. It reduces
the widths of the following generated C files:

  file                width before  width after
  ------------------  ------------  -----------
  include/libnbd.h              81           79
  lib/api.c                    206           79
  ocaml/nbd-c.c                108           79
  python/libnbdmod.c           130           79
  python/methods.h             104           80

The following generated C files remain for the next wave:

  file                width
  ------------------  -----
  lib/states-run.c      102
  lib/states.c          116
  lib/states.h          123

Quite a few patches in the series are easier to review with "git show
-b" or "git show --color-words", due to code reindentation or other
relatively mechanical changes. (And I've just found out about "git show
--color-moved", which works really well on patch #08, 'generator/utils:
factor out "pr_buf"', for example.) Most patches where such display
tweaks are beneficial mention that fact.

These formatting tweaks are also the reason why I've pushed the branch
to my libnbd fork on gitlab (see URL & branch name above). The posted
patches should be possible to apply with git-am, for merging (thus, they
couldn't be formatted with the "-b" option, for example), but for
review, it may be easier to just fetch them (or to fetch them in
addition) and to show them locally.

Thanks for reviewing,
Laszlo

Laszlo Ersek (23):
  generator: split LIBNBD_ATTRIBUTE_NONNULL replacement text
  generator: wrap "python/methods.h" at 80 characters
  generator: wrap "python/libnbdmod.c" at 80 characters
  generator: split "int64_from_uint32_array" calls in "ocaml/nbd-c.c"
  generator: wrap nbd_internal_ocaml_raise_closed() calls in
    "ocaml/nbd-c.c"
  generator: factor out "num_args" in "print_ocaml_binding"
  generator: wrap byte-code compat function bodies in "ocaml/nbd-c.c"
  generator/utils: factor out "pr_buf"
  generator/utils: comment on "maxcol" handling in "pr_wrap"
  generator/utils: add "pr_wrap_cstr"
  generator/C: print_trace_enter: break "enter" to a common new line
  generator/C: print_trace_enter: expand "function" shorthand in value
    iters
  generator/C: print_trace_enter: print Closure values uniformly with
    others
  generator/C: print_trace_enter: generate commas as suffixes, not
    prefixes
  generator/C: print_trace_enter: strip spaces around PRI* macros
  generator/C: print_trace_enter: wrap "enter" debug() / debug_direct()
    call
  generator/C: print_wrapper: break apart the "ready" & "processing"
    states
  generator/C: print_wrapper: fold permitted states error message
  generator/C: print_trace_leave: separate arg list from function
    designator
  generator/C: print_trace_leave: wrap "leave" debug() / debug_direct()
    call
  generator/C: print_flags_check: break guard condition to a new line
  generator/C: print_wrapper: use helper variable for permitted state
    check
  generator/C: lib/api.c: indent arg list 2 spaces relative to function
    name

 generator/C.ml      | 195 ++++++++++++--------
 generator/OCaml.ml  |  27 ++-
 generator/Python.ml |  13 +-
 generator/utils.ml  |  85 ++++++++-
 generator/utils.mli |   1 +
 ocaml/helpers.c     |   2 +-
 ocaml/nbd-c.h       |   3 +-
 7 files changed, 225 insertions(+), 101 deletions(-)


base-commit: 0744f748ed900fb0537da9a5b6532538f3c78e83
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to