|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Remus: remove Py_RETURN_NONE for Python 2.3
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |