tools/python: mismatch between pyxc_methods flags and PyObject definitions
authorYOUNG, MICHAEL A <m.a.young@durham.ac.uk>
Tue, 17 Mar 2020 23:01:43 +0000 (23:01 +0000)
committerWei Liu <wl@xen.org>
Sat, 28 Mar 2020 11:04:54 +0000 (11:04 +0000)
commite19b4b3b55f84e0cfcc02fe5d66965969a81c965
treeb70e36c5d9cb9234979189a84cd8f688c969c62f
parenta87676c4a32f94d79fcaf5b4e0eb59e880e0f032
tools/python: mismatch between pyxc_methods flags and PyObject definitions

pygrub in xen-4.13.0 with python 3.8.2 fails with the error

Traceback (most recent call last):
  File "/usr/libexec/xen/bin/pygrub", line 21, in <module>
    import xen.lowlevel.xc
SystemError: bad call flags

This patch fixes mismatches in tools/python/xen/lowlevel/xc/xc.c
between the flag bits defined in pyxc_methods and the parameters passed
to the corresponding PyObject definitions.

With this patch applied pygrub works as expected.

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Reviewed-by: Wei Liu <wl@xen.org>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
tools/python/xen/lowlevel/xc/xc.c