Esempio n. 1
0
static PyObject*
python_api_cons_bad_cmd_usage(PyObject *self, PyObject *args)
{
    PyObject *cmd = NULL;
    if (!PyArg_ParseTuple(args, "O", &cmd)) {
        Py_RETURN_NONE;
    }

    char *cmd_str = python_str_or_unicode_to_string(cmd);

    allow_python_threads();
    api_cons_bad_cmd_usage(cmd_str);
    free(cmd_str);
    disable_python_threads();

    Py_RETURN_NONE;
}
Esempio n. 2
0
static int
c_api_cons_bad_cmd_usage(const char *const cmd)
{
    return api_cons_bad_cmd_usage(cmd);
}