From: "KUWAMURA Shin'ya" Subject: [PATCH] Remus: remove Py_RETURN_NONE for Python 2.3 Date: Fri, 20 Nov 2009 14:52:24 +0900 (JST) Message-ID: <20091120.145224.38218569.kuwa@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_Nov_20_14_52_24_2009_491)--" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ----Next_Part(Fri_Nov_20_14_52_24_2009_491)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Best regards, -- KUWAMURA Shin'ya ----Next_Part(Fri_Nov_20_14_52_24_2009_491)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="remove-py-return-none-python-2.3.patch" # HG changeset patch # User KUWAMURA Shin'ya # 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 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[] = { ----Next_Part(Fri_Nov_20_14_52_24_2009_491)-- Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ----Next_Part(Fri_Nov_20_14_52_24_2009_491)----