[lxc-devel] [PATCH] python: Fix runtime failure on armhf
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Mar 26 15:13:53 UTC 2013
Quoting Stéphane Graber (stgraber at ubuntu.com):
> Recent testing on Ubuntu armhf showed that the python module was
> failing to import. After some time tracking the issue down, the problem
> was identified as being a non-terminated list of get/setters.
>
> This commit fixes that issue as well as a few other potential ones that
> were identified during debugging.
>
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
thanks :)
> ---
> src/python-lxc/lxc.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/src/python-lxc/lxc.c b/src/python-lxc/lxc.c
> index f2b25c1..06d3396 100644
> --- a/src/python-lxc/lxc.c
> +++ b/src/python-lxc/lxc.c
> @@ -96,13 +96,13 @@ Container_init(Container *self, PyObject *args, PyObject *kwds)
> }
>
> static PyObject *
> -get_default_config_path(Container *self, PyObject *args, PyObject *kwds)
> +LXC_get_default_config_path(PyObject *self, PyObject *args)
> {
> return PyUnicode_FromString(lxc_get_default_config_path());
> }
>
> static PyObject *
> -get_version(Container *self, PyObject *args, PyObject *kwds)
> +LXC_get_version(PyObject *self, PyObject *args)
> {
> return PyUnicode_FromString(lxc_get_version());
> }
> @@ -496,6 +496,7 @@ static PyGetSetDef Container_getseters[] = {
> (getter)Container_state, 0,
> "Container state",
> NULL},
> + {NULL, NULL, NULL, NULL, NULL}
> };
>
> static PyMethodDef Container_methods[] = {
> @@ -595,7 +596,7 @@ static PyMethodDef Container_methods[] = {
> "\n"
> "Wait for the container to reach a given state or timeout."
> },
> - {NULL} /* Sentinel */
> + {NULL, NULL, 0, NULL}
> };
>
> static PyTypeObject _lxc_ContainerType = {
> @@ -641,9 +642,9 @@ PyVarObject_HEAD_INIT(NULL, 0)
> };
>
> static PyMethodDef LXC_methods[] = {
> - {"get_default_config_path", (PyCFunction)get_default_config_path, METH_NOARGS,
> + {"get_default_config_path", (PyCFunction)LXC_get_default_config_path, METH_NOARGS,
> "Returns the current LXC config path"},
> - {"get_version", (PyCFunction)get_version, METH_NOARGS,
> + {"get_version", (PyCFunction)LXC_get_version, METH_NOARGS,
> "Returns the current LXC library version"},
> {NULL, NULL, 0, NULL}
> };
> --
> 1.8.1.2
>
>
> ------------------------------------------------------------------------------
> Own the Future-Intel® Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
More information about the lxc-devel
mailing list