lxc.c revision edb09f8d1bb822c4f23d745ae8117bf084e1d12c
baf6671fd3847865da9b64dc8f8be85d81304840Daniel Lezcano * python-lxc: Python bindings for LXC
5c320b769229d713e84b02ed6b7ae1309ac31dbbGuido Trotter * (C) Copyright Canonical Ltd. 2012
d1de19abd0067f38bc08a4a3357de701a4e5571ddlezcano * Stéphane Graber <stgraber@ubuntu.com>
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber * This library is free software; you can redistribute it and/or
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber * modify it under the terms of the GNU Lesser General Public
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber * License as published by the Free Software Foundation; either
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber * version 2.1 of the License, or (at your option) any later version.
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber * This library is distributed in the hope that it will be useful,
d1de19abd0067f38bc08a4a3357de701a4e5571ddlezcano * but WITHOUT ANY WARRANTY; without even the implied warranty of
d1de19abd0067f38bc08a4a3357de701a4e5571ddlezcano * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d1de19abd0067f38bc08a4a3357de701a4e5571ddlezcano * Lesser General Public License for more details.
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber * You should have received a copy of the GNU Lesser General Public
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber * License along with this library; if not, write to the Free Software
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Grabertypedef struct {
d1de19abd0067f38bc08a4a3357de701a4e5571ddlezcanoconvert_tuple_to_char_pointer_array(PyObject *argv) {
4019712d198a7d50b08b326ade17f5ff1666efbbStéphane Graber char **result = (char**) malloc(sizeof(char*)*argc + 1);
6a85cf91247b7dd9c3faeddceca8dacb96d02cd6Stéphane Graber for (i = 0; i < argc; i++) {
f080ffd7d656fbd9505a8e8eb52a05d61355c677Dwight Engen PyErr_SetString(PyExc_ValueError, "Expected a string");
7822022c4c72cee06905b540b89b653491d6f6b2Stéphane Graber memcpy((char *) &result[i], (char *) &str, sizeof(str));
static PyObject *
static PyObject *
static PyObject *
static PyObject *
static PyObject *
static PyObject *
static PyObject *
static PyObject *
&key))
static PyObject *
if (!create_args) {
return NULL;
static PyObject *
static PyObject *
static PyObject *
int len = 0;
&key))
if (len <= 0) {
static PyObject *
int len = 0;
&key))
if (len <= 0) {
static PyObject *
static PyObject *
int len = 0;
&key))
if (len <= 0) {
static PyObject *
&path))
static PyObject *
&path))
static PyObject *
static PyObject *
static PyObject *
&path))
static PyObject *
&timeout))
static PyObject *
int init_useinit = 0;
if (!init_args) {
return NULL;
static PyObject *
static PyObject *
static PyObject *
NULL},
NULL},
NULL},
NULL},
NULL},
NULL},
PyInit__lxc(void)
PyObject* m;
return NULL;
if (m == NULL)
return NULL;