summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_dbmmodule.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/_dbmmodule.c.h')
-rw-r--r--Modules/clinic/_dbmmodule.c.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h
index 172dc4b..98aac07 100644
--- a/Modules/clinic/_dbmmodule.c.h
+++ b/Modules/clinic/_dbmmodule.c.h
@@ -138,6 +138,28 @@ exit:
return return_value;
}
+PyDoc_STRVAR(_dbm_dbm_clear__doc__,
+"clear($self, /)\n"
+"--\n"
+"\n"
+"Remove all items from the database.");
+
+#define _DBM_DBM_CLEAR_METHODDEF \
+ {"clear", _PyCFunction_CAST(_dbm_dbm_clear), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _dbm_dbm_clear__doc__},
+
+static PyObject *
+_dbm_dbm_clear_impl(dbmobject *self, PyTypeObject *cls);
+
+static PyObject *
+_dbm_dbm_clear(dbmobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ if (nargs) {
+ PyErr_SetString(PyExc_TypeError, "clear() takes no arguments");
+ return NULL;
+ }
+ return _dbm_dbm_clear_impl(self, cls);
+}
+
PyDoc_STRVAR(dbmopen__doc__,
"open($module, filename, flags=\'r\', mode=0o666, /)\n"
"--\n"
@@ -200,4 +222,4 @@ skip_optional:
exit:
return return_value;
}
-/*[clinic end generated code: output=28dcf736654137c2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b3053c67ecfcc29c input=a9049054013a1b77]*/