[Libguestfs] [nbdkit PATCH 1/2] python: Use Py_XDEFREF()
Eric Blake
eblake at redhat.com
Sat Apr 7 11:30:49 UTC 2018
On 04/06/2018 05:24 PM, Eric Blake wrote:
> No need to do a NULL check ourself, when we can just use the
> write Python wrapper.
s/write/right/ (I should quit writing commit messages late in the day...)
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> plugins/python/python.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/plugins/python/python.c b/plugins/python/python.c
> index 35e8df2..c5cc4bd 100644
> --- a/plugins/python/python.c
> +++ b/plugins/python/python.c
> @@ -183,8 +183,7 @@ py_load (void)
> static void
> py_unload (void)
> {
> - if (module)
> - Py_DECREF (module);
> + Py_XDECREF (module);
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180407/5563371c/attachment.sig>
More information about the Libguestfs
mailing list