aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Modules/clinic/pyexpat.c.h
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/tools/python3/src/Modules/clinic/pyexpat.c.h
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Modules/clinic/pyexpat.c.h')
-rw-r--r--contrib/tools/python3/src/Modules/clinic/pyexpat.c.h298
1 files changed, 149 insertions, 149 deletions
diff --git a/contrib/tools/python3/src/Modules/clinic/pyexpat.c.h b/contrib/tools/python3/src/Modules/clinic/pyexpat.c.h
index ee5907ca7e..6df048f2ff 100644
--- a/contrib/tools/python3/src/Modules/clinic/pyexpat.c.h
+++ b/contrib/tools/python3/src/Modules/clinic/pyexpat.c.h
@@ -11,7 +11,7 @@ PyDoc_STRVAR(pyexpat_xmlparser_Parse__doc__,
"`isfinal\' should be true at end of input.");
#define PYEXPAT_XMLPARSER_PARSE_METHODDEF \
- {"Parse", (PyCFunction)(void(*)(void))pyexpat_xmlparser_Parse, METH_FASTCALL, pyexpat_xmlparser_Parse__doc__},
+ {"Parse", (PyCFunction)(void(*)(void))pyexpat_xmlparser_Parse, METH_FASTCALL, pyexpat_xmlparser_Parse__doc__},
static PyObject *
pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
@@ -24,23 +24,23 @@ pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject *const *args, Py_ssize_t
PyObject *data;
int isfinal = 0;
- if (!_PyArg_CheckPositional("Parse", nargs, 1, 2)) {
+ if (!_PyArg_CheckPositional("Parse", nargs, 1, 2)) {
goto exit;
}
- data = args[0];
- if (nargs < 2) {
- goto skip_optional;
- }
- if (PyFloat_Check(args[1])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
- isfinal = _PyLong_AsInt(args[1]);
- if (isfinal == -1 && PyErr_Occurred()) {
- goto exit;
- }
-skip_optional:
+ data = args[0];
+ if (nargs < 2) {
+ goto skip_optional;
+ }
+ if (PyFloat_Check(args[1])) {
+ PyErr_SetString(PyExc_TypeError,
+ "integer argument expected, got float" );
+ goto exit;
+ }
+ isfinal = _PyLong_AsInt(args[1]);
+ if (isfinal == -1 && PyErr_Occurred()) {
+ goto exit;
+ }
+skip_optional:
return_value = pyexpat_xmlparser_Parse_impl(self, data, isfinal);
exit:
@@ -74,19 +74,19 @@ pyexpat_xmlparser_SetBase(xmlparseobject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *base;
- if (!PyUnicode_Check(arg)) {
- _PyArg_BadArgument("SetBase", "argument", "str", arg);
- goto exit;
- }
- Py_ssize_t base_length;
- base = PyUnicode_AsUTF8AndSize(arg, &base_length);
- if (base == NULL) {
- goto exit;
- }
- if (strlen(base) != (size_t)base_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
+ if (!PyUnicode_Check(arg)) {
+ _PyArg_BadArgument("SetBase", "argument", "str", arg);
goto exit;
}
+ Py_ssize_t base_length;
+ base = PyUnicode_AsUTF8AndSize(arg, &base_length);
+ if (base == NULL) {
+ goto exit;
+ }
+ if (strlen(base) != (size_t)base_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
return_value = pyexpat_xmlparser_SetBase_impl(self, base);
exit:
@@ -133,14 +133,14 @@ pyexpat_xmlparser_GetInputContext(xmlparseobject *self, PyObject *Py_UNUSED(igno
}
PyDoc_STRVAR(pyexpat_xmlparser_ExternalEntityParserCreate__doc__,
-"ExternalEntityParserCreate($self, context, encoding=<unrepresentable>,\n"
-" /)\n"
+"ExternalEntityParserCreate($self, context, encoding=<unrepresentable>,\n"
+" /)\n"
"--\n"
"\n"
"Create a parser for parsing an external entity based on the information passed to the ExternalEntityRefHandler.");
#define PYEXPAT_XMLPARSER_EXTERNALENTITYPARSERCREATE_METHODDEF \
- {"ExternalEntityParserCreate", (PyCFunction)(void(*)(void))pyexpat_xmlparser_ExternalEntityParserCreate, METH_FASTCALL, pyexpat_xmlparser_ExternalEntityParserCreate__doc__},
+ {"ExternalEntityParserCreate", (PyCFunction)(void(*)(void))pyexpat_xmlparser_ExternalEntityParserCreate, METH_FASTCALL, pyexpat_xmlparser_ExternalEntityParserCreate__doc__},
static PyObject *
pyexpat_xmlparser_ExternalEntityParserCreate_impl(xmlparseobject *self,
@@ -154,44 +154,44 @@ pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject *con
const char *context;
const char *encoding = NULL;
- if (!_PyArg_CheckPositional("ExternalEntityParserCreate", nargs, 1, 2)) {
- goto exit;
- }
- if (args[0] == Py_None) {
- context = NULL;
- }
- else if (PyUnicode_Check(args[0])) {
- Py_ssize_t context_length;
- context = PyUnicode_AsUTF8AndSize(args[0], &context_length);
- if (context == NULL) {
- goto exit;
- }
- if (strlen(context) != (size_t)context_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
- goto exit;
- }
- }
- else {
- _PyArg_BadArgument("ExternalEntityParserCreate", "argument 1", "str or None", args[0]);
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- if (!PyUnicode_Check(args[1])) {
- _PyArg_BadArgument("ExternalEntityParserCreate", "argument 2", "str", args[1]);
- goto exit;
- }
- Py_ssize_t encoding_length;
- encoding = PyUnicode_AsUTF8AndSize(args[1], &encoding_length);
- if (encoding == NULL) {
- goto exit;
- }
- if (strlen(encoding) != (size_t)encoding_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
+ if (!_PyArg_CheckPositional("ExternalEntityParserCreate", nargs, 1, 2)) {
goto exit;
}
-skip_optional:
+ if (args[0] == Py_None) {
+ context = NULL;
+ }
+ else if (PyUnicode_Check(args[0])) {
+ Py_ssize_t context_length;
+ context = PyUnicode_AsUTF8AndSize(args[0], &context_length);
+ if (context == NULL) {
+ goto exit;
+ }
+ if (strlen(context) != (size_t)context_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
+ }
+ else {
+ _PyArg_BadArgument("ExternalEntityParserCreate", "argument 1", "str or None", args[0]);
+ goto exit;
+ }
+ if (nargs < 2) {
+ goto skip_optional;
+ }
+ if (!PyUnicode_Check(args[1])) {
+ _PyArg_BadArgument("ExternalEntityParserCreate", "argument 2", "str", args[1]);
+ goto exit;
+ }
+ Py_ssize_t encoding_length;
+ encoding = PyUnicode_AsUTF8AndSize(args[1], &encoding_length);
+ if (encoding == NULL) {
+ goto exit;
+ }
+ if (strlen(encoding) != (size_t)encoding_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
+skip_optional:
return_value = pyexpat_xmlparser_ExternalEntityParserCreate_impl(self, context, encoding);
exit:
@@ -221,15 +221,15 @@ pyexpat_xmlparser_SetParamEntityParsing(xmlparseobject *self, PyObject *arg)
PyObject *return_value = NULL;
int flag;
- if (PyFloat_Check(arg)) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
- flag = _PyLong_AsInt(arg);
- if (flag == -1 && PyErr_Occurred()) {
+ if (PyFloat_Check(arg)) {
+ PyErr_SetString(PyExc_TypeError,
+ "integer argument expected, got float" );
goto exit;
}
+ flag = _PyLong_AsInt(arg);
+ if (flag == -1 && PyErr_Occurred()) {
+ goto exit;
+ }
return_value = pyexpat_xmlparser_SetParamEntityParsing_impl(self, flag);
exit:
@@ -249,7 +249,7 @@ PyDoc_STRVAR(pyexpat_xmlparser_UseForeignDTD__doc__,
"information to the parser. \'flag\' defaults to True if not provided.");
#define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF \
- {"UseForeignDTD", (PyCFunction)(void(*)(void))pyexpat_xmlparser_UseForeignDTD, METH_FASTCALL, pyexpat_xmlparser_UseForeignDTD__doc__},
+ {"UseForeignDTD", (PyCFunction)(void(*)(void))pyexpat_xmlparser_UseForeignDTD, METH_FASTCALL, pyexpat_xmlparser_UseForeignDTD__doc__},
static PyObject *
pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, int flag);
@@ -260,17 +260,17 @@ pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject *const *args, Py_
PyObject *return_value = NULL;
int flag = 1;
- if (!_PyArg_CheckPositional("UseForeignDTD", nargs, 0, 1)) {
+ if (!_PyArg_CheckPositional("UseForeignDTD", nargs, 0, 1)) {
goto exit;
}
- if (nargs < 1) {
- goto skip_optional;
- }
- flag = PyObject_IsTrue(args[0]);
- if (flag < 0) {
- goto exit;
- }
-skip_optional:
+ if (nargs < 1) {
+ goto skip_optional;
+ }
+ flag = PyObject_IsTrue(args[0]);
+ if (flag < 0) {
+ goto exit;
+ }
+skip_optional:
return_value = pyexpat_xmlparser_UseForeignDTD_impl(self, flag);
exit:
@@ -281,13 +281,13 @@ exit:
PyDoc_STRVAR(pyexpat_ParserCreate__doc__,
"ParserCreate($module, /, encoding=None, namespace_separator=None,\n"
-" intern=<unrepresentable>)\n"
+" intern=<unrepresentable>)\n"
"--\n"
"\n"
"Return a new XML parser object.");
#define PYEXPAT_PARSERCREATE_METHODDEF \
- {"ParserCreate", (PyCFunction)(void(*)(void))pyexpat_ParserCreate, METH_FASTCALL|METH_KEYWORDS, pyexpat_ParserCreate__doc__},
+ {"ParserCreate", (PyCFunction)(void(*)(void))pyexpat_ParserCreate, METH_FASTCALL|METH_KEYWORDS, pyexpat_ParserCreate__doc__},
static PyObject *
pyexpat_ParserCreate_impl(PyObject *module, const char *encoding,
@@ -298,68 +298,68 @@ pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs,
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"encoding", "namespace_separator", "intern", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "ParserCreate", 0};
- PyObject *argsbuf[3];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
+ static _PyArg_Parser _parser = {NULL, _keywords, "ParserCreate", 0};
+ PyObject *argsbuf[3];
+ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
const char *encoding = NULL;
const char *namespace_separator = NULL;
PyObject *intern = NULL;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf);
- if (!args) {
+ args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf);
+ if (!args) {
goto exit;
}
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[0]) {
- if (args[0] == Py_None) {
- encoding = NULL;
- }
- else if (PyUnicode_Check(args[0])) {
- Py_ssize_t encoding_length;
- encoding = PyUnicode_AsUTF8AndSize(args[0], &encoding_length);
- if (encoding == NULL) {
- goto exit;
- }
- if (strlen(encoding) != (size_t)encoding_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
- goto exit;
- }
- }
- else {
- _PyArg_BadArgument("ParserCreate", "argument 'encoding'", "str or None", args[0]);
- goto exit;
- }
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- if (args[1]) {
- if (args[1] == Py_None) {
- namespace_separator = NULL;
- }
- else if (PyUnicode_Check(args[1])) {
- Py_ssize_t namespace_separator_length;
- namespace_separator = PyUnicode_AsUTF8AndSize(args[1], &namespace_separator_length);
- if (namespace_separator == NULL) {
- goto exit;
- }
- if (strlen(namespace_separator) != (size_t)namespace_separator_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
- goto exit;
- }
- }
- else {
- _PyArg_BadArgument("ParserCreate", "argument 'namespace_separator'", "str or None", args[1]);
- goto exit;
- }
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- intern = args[2];
-skip_optional_pos:
+ if (!noptargs) {
+ goto skip_optional_pos;
+ }
+ if (args[0]) {
+ if (args[0] == Py_None) {
+ encoding = NULL;
+ }
+ else if (PyUnicode_Check(args[0])) {
+ Py_ssize_t encoding_length;
+ encoding = PyUnicode_AsUTF8AndSize(args[0], &encoding_length);
+ if (encoding == NULL) {
+ goto exit;
+ }
+ if (strlen(encoding) != (size_t)encoding_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
+ }
+ else {
+ _PyArg_BadArgument("ParserCreate", "argument 'encoding'", "str or None", args[0]);
+ goto exit;
+ }
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+ if (args[1]) {
+ if (args[1] == Py_None) {
+ namespace_separator = NULL;
+ }
+ else if (PyUnicode_Check(args[1])) {
+ Py_ssize_t namespace_separator_length;
+ namespace_separator = PyUnicode_AsUTF8AndSize(args[1], &namespace_separator_length);
+ if (namespace_separator == NULL) {
+ goto exit;
+ }
+ if (strlen(namespace_separator) != (size_t)namespace_separator_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
+ }
+ else {
+ _PyArg_BadArgument("ParserCreate", "argument 'namespace_separator'", "str or None", args[1]);
+ goto exit;
+ }
+ if (!--noptargs) {
+ goto skip_optional_pos;
+ }
+ }
+ intern = args[2];
+skip_optional_pos:
return_value = pyexpat_ParserCreate_impl(module, encoding, namespace_separator, intern);
exit:
@@ -384,15 +384,15 @@ pyexpat_ErrorString(PyObject *module, PyObject *arg)
PyObject *return_value = NULL;
long code;
- if (PyFloat_Check(arg)) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
- code = PyLong_AsLong(arg);
- if (code == -1 && PyErr_Occurred()) {
+ if (PyFloat_Check(arg)) {
+ PyErr_SetString(PyExc_TypeError,
+ "integer argument expected, got float" );
goto exit;
}
+ code = PyLong_AsLong(arg);
+ if (code == -1 && PyErr_Occurred()) {
+ goto exit;
+ }
return_value = pyexpat_ErrorString_impl(module, code);
exit:
@@ -402,4 +402,4 @@ exit:
#ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
-/*[clinic end generated code: output=68ce25024280af41 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=68ce25024280af41 input=a9049054013a1b77]*/