summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_suggestions.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/_suggestions.c.h')
-rw-r--r--Modules/clinic/_suggestions.c.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/Modules/clinic/_suggestions.c.h b/Modules/clinic/_suggestions.c.h
new file mode 100644
index 0000000..51484b1
--- /dev/null
+++ b/Modules/clinic/_suggestions.c.h
@@ -0,0 +1,41 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
+
+PyDoc_STRVAR(_suggestions__generate_suggestions__doc__,
+"_generate_suggestions($module, candidates, item, /)\n"
+"--\n"
+"\n"
+"Returns the candidate in candidates that\'s closest to item");
+
+#define _SUGGESTIONS__GENERATE_SUGGESTIONS_METHODDEF \
+ {"_generate_suggestions", _PyCFunction_CAST(_suggestions__generate_suggestions), METH_FASTCALL, _suggestions__generate_suggestions__doc__},
+
+static PyObject *
+_suggestions__generate_suggestions_impl(PyObject *module,
+ PyObject *candidates, PyObject *item);
+
+static PyObject *
+_suggestions__generate_suggestions(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
+{
+ PyObject *return_value = NULL;
+ PyObject *candidates;
+ PyObject *item;
+
+ if (!_PyArg_CheckPositional("_generate_suggestions", nargs, 2, 2)) {
+ goto exit;
+ }
+ candidates = args[0];
+ if (!PyUnicode_Check(args[1])) {
+ _PyArg_BadArgument("_generate_suggestions", "argument 2", "str", args[1]);
+ goto exit;
+ }
+ item = args[1];
+ return_value = _suggestions__generate_suggestions_impl(module, candidates, item);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=1d8e963cdae30b13 input=a9049054013a1b77]*/