aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Modules/clinic/_dbmmodule.c.h
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Modules/clinic/_dbmmodule.c.h
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Modules/clinic/_dbmmodule.c.h')
-rw-r--r--contrib/tools/python3/src/Modules/clinic/_dbmmodule.c.h84
1 files changed, 42 insertions, 42 deletions
diff --git a/contrib/tools/python3/src/Modules/clinic/_dbmmodule.c.h b/contrib/tools/python3/src/Modules/clinic/_dbmmodule.c.h
index 963cbdb3cb..a7d7350850 100644
--- a/contrib/tools/python3/src/Modules/clinic/_dbmmodule.c.h
+++ b/contrib/tools/python3/src/Modules/clinic/_dbmmodule.c.h
@@ -45,7 +45,7 @@ PyDoc_STRVAR(_dbm_dbm_get__doc__,
"Return the value for key if present, otherwise default.");
#define _DBM_DBM_GET_METHODDEF \
- {"get", (PyCFunction)(void(*)(void))_dbm_dbm_get, METH_FASTCALL, _dbm_dbm_get__doc__},
+ {"get", (PyCFunction)(void(*)(void))_dbm_dbm_get, METH_FASTCALL, _dbm_dbm_get__doc__},
static PyObject *
_dbm_dbm_get_impl(dbmobject *self, const char *key,
@@ -78,7 +78,7 @@ PyDoc_STRVAR(_dbm_dbm_setdefault__doc__,
"If key is not in the database, it is inserted with default as the value.");
#define _DBM_DBM_SETDEFAULT_METHODDEF \
- {"setdefault", (PyCFunction)(void(*)(void))_dbm_dbm_setdefault, METH_FASTCALL, _dbm_dbm_setdefault__doc__},
+ {"setdefault", (PyCFunction)(void(*)(void))_dbm_dbm_setdefault, METH_FASTCALL, _dbm_dbm_setdefault__doc__},
static PyObject *
_dbm_dbm_setdefault_impl(dbmobject *self, const char *key,
@@ -118,7 +118,7 @@ PyDoc_STRVAR(dbmopen__doc__,
" (e.g. os.O_RDWR).");
#define DBMOPEN_METHODDEF \
- {"open", (PyCFunction)(void(*)(void))dbmopen, METH_FASTCALL, dbmopen__doc__},
+ {"open", (PyCFunction)(void(*)(void))dbmopen, METH_FASTCALL, dbmopen__doc__},
static PyObject *
dbmopen_impl(PyObject *module, PyObject *filename, const char *flags,
@@ -132,49 +132,49 @@ dbmopen(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
const char *flags = "r";
int mode = 438;
- if (!_PyArg_CheckPositional("open", nargs, 1, 3)) {
+ if (!_PyArg_CheckPositional("open", nargs, 1, 3)) {
goto exit;
}
- if (!PyUnicode_Check(args[0])) {
- _PyArg_BadArgument("open", "argument 1", "str", args[0]);
- goto exit;
- }
- if (PyUnicode_READY(args[0]) == -1) {
- goto exit;
- }
- filename = args[0];
- if (nargs < 2) {
- goto skip_optional;
- }
- if (!PyUnicode_Check(args[1])) {
- _PyArg_BadArgument("open", "argument 2", "str", args[1]);
- goto exit;
- }
- Py_ssize_t flags_length;
- flags = PyUnicode_AsUTF8AndSize(args[1], &flags_length);
- if (flags == NULL) {
- goto exit;
- }
- if (strlen(flags) != (size_t)flags_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- if (PyFloat_Check(args[2])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
- mode = _PyLong_AsInt(args[2]);
- if (mode == -1 && PyErr_Occurred()) {
- goto exit;
- }
-skip_optional:
+ if (!PyUnicode_Check(args[0])) {
+ _PyArg_BadArgument("open", "argument 1", "str", args[0]);
+ goto exit;
+ }
+ if (PyUnicode_READY(args[0]) == -1) {
+ goto exit;
+ }
+ filename = args[0];
+ if (nargs < 2) {
+ goto skip_optional;
+ }
+ if (!PyUnicode_Check(args[1])) {
+ _PyArg_BadArgument("open", "argument 2", "str", args[1]);
+ goto exit;
+ }
+ Py_ssize_t flags_length;
+ flags = PyUnicode_AsUTF8AndSize(args[1], &flags_length);
+ if (flags == NULL) {
+ goto exit;
+ }
+ if (strlen(flags) != (size_t)flags_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
+ if (nargs < 3) {
+ goto skip_optional;
+ }
+ if (PyFloat_Check(args[2])) {
+ PyErr_SetString(PyExc_TypeError,
+ "integer argument expected, got float" );
+ goto exit;
+ }
+ mode = _PyLong_AsInt(args[2]);
+ if (mode == -1 && PyErr_Occurred()) {
+ goto exit;
+ }
+skip_optional:
return_value = dbmopen_impl(module, filename, flags, mode);
exit:
return return_value;
}
-/*[clinic end generated code: output=7ced103488cbca7a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7ced103488cbca7a input=a9049054013a1b77]*/