WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Remus: remove Py_RETURN_NONE for Python 2.3

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Remus: remove Py_RETURN_NONE for Python 2.3
From: "KUWAMURA Shin'ya" <kuwa@xxxxxxxxxxxxxx>
Date: Fri, 20 Nov 2009 14:52:24 +0900 (JST)
Delivery-date: Thu, 19 Nov 2009 21:53:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Is Python 2.3 still supported? If yes, this patch is required because
Python 2.3 does not have Py_RETURN_NONE.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

Best regards,
-- 
  KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# Date 1258694430 -32400
# Node ID 6fbf632dcfdd3557b9c2ee6e84465079503d7b6c
# Parent  36a841785e3b8b3a8b4d067049bba6db1f4e9020
Remus: remove Py_RETURN_NONE for Python 2.3

Python 2.3 does not have Py_RETURN_NONE.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

diff -r 36a841785e3b -r 6fbf632dcfdd 
tools/python/xen/lowlevel/checkpoint/checkpoint.c
--- a/tools/python/xen/lowlevel/checkpoint/checkpoint.c Thu Nov 19 11:31:44 
2009 +0900
+++ b/tools/python/xen/lowlevel/checkpoint/checkpoint.c Fri Nov 20 14:20:30 
2009 +0900
@@ -72,7 +72,8 @@ static PyObject* pycheckpoint_open(PyObj
     return NULL;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyObject* pycheckpoint_close(PyObject* obj, PyObject* args)
@@ -88,7 +89,8 @@ static PyObject* pycheckpoint_close(PyOb
   Py_XDECREF(self->checkpoint_cb);
   self->checkpoint_cb = NULL;
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyObject* pycheckpoint_start(PyObject* obj, PyObject* args) {
@@ -163,7 +165,8 @@ static PyObject* pycheckpoint_start(PyOb
     goto err;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 
   err:
   self->suspend_cb = NULL;
diff -r 36a841785e3b -r 6fbf632dcfdd tools/python/xen/lowlevel/netlink/netlink.c
--- a/tools/python/xen/lowlevel/netlink/netlink.c       Thu Nov 19 11:31:44 
2009 +0900
+++ b/tools/python/xen/lowlevel/netlink/netlink.c       Fri Nov 20 14:20:30 
2009 +0900
@@ -55,7 +55,8 @@ static PyObject* pyrtnl_talk(PyObject* o
     return NULL;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyObject* pyrtnl_wilddump_request(PyObject* obj, PyObject* args)
@@ -71,7 +72,8 @@ static PyObject* pyrtnl_wilddump_request
     return NULL;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyObject* pyrtnl_dump_request(PyObject* obj, PyObject* args)
@@ -89,7 +91,8 @@ static PyObject* pyrtnl_dump_request(PyO
     return NULL;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 /* translate args to python and call python callback */
@@ -133,7 +136,8 @@ static PyObject* pyrtnl_dump_filter(PyOb
   }
   Py_DECREF(filter);
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyMethodDef PyRtnl_methods[] = {
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>