Exemplo n.º 1
0
static void
c_api_completer_clear(const char *filename, const char *key)
{
    char *plugin_name = _c_plugin_name(filename);
    log_debug("Autocomplete clear %s for %s", key, plugin_name);

    api_completer_clear(plugin_name, key);

    free(plugin_name);
}
Exemplo n.º 2
0
static PyObject *
python_api_completer_clear(PyObject *self, PyObject *args)
{
    PyObject *key = NULL;

    if (!PyArg_ParseTuple(args, "O", &key)) {
        Py_RETURN_NONE;
    }

    char *key_str = python_str_or_unicode_to_string(key);

    char *plugin_name = _python_plugin_name();
    log_debug("Autocomplete clear %s for %s", key_str, plugin_name);

    allow_python_threads();
    api_completer_clear(plugin_name, key_str);
    free(key_str);
    disable_python_threads();

    free(plugin_name);

    Py_RETURN_NONE;
}