xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Marek Marczykowski <marmarek@invisiblethingslab.com>
To: xen-devel@lists.xen.org
Cc: marmarek@invisiblethingslab.com
Subject: [PATCH] python-libxl: Py_INCREF(Py_None) when returing Py_None
Date: Wed, 07 Mar 2012 01:31:05 +0100	[thread overview]
Message-ID: <fbb9214867da59444849.1331080265@devel14> (raw)

# HG changeset patch
# User Marek Marczykowski <marmarek@invisiblethingslab.com>
# Date 1331080262 -3600
# Node ID fbb9214867da594448499c0834f3f906f150f8c5
# Parent  8964c223836c2889364aa75cb1a662ff5eacd5d8
python-libxl: Py_INCREF(Py_None) when returing Py_None

Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>

diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c
--- a/tools/python/xen/lowlevel/xl/xl.c
+++ b/tools/python/xen/lowlevel/xl/xl.c
@@ -408,6 +408,8 @@ static PyObject *pyxl_domid_to_name(XlOb
     domname = libxl_domid_to_name(self->ctx, domid);
     if (domname)
         ret = PyString_FromString(domname);
+	else
+		Py_INCREF(Py_None);
     free(domname);
 
     return ret;

             reply	other threads:[~2012-03-07  0:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07  0:31 Marek Marczykowski [this message]
2012-03-13 17:20 ` [PATCH] python-libxl: Py_INCREF(Py_None) when returing Py_None Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fbb9214867da59444849.1331080265@devel14 \
    --to=marmarek@invisiblethingslab.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).