aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Objects/clinic/floatobject.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/Objects/clinic/floatobject.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/Objects/clinic/floatobject.c.h')
-rw-r--r--contrib/tools/python3/src/Objects/clinic/floatobject.c.h192
1 files changed, 96 insertions, 96 deletions
diff --git a/contrib/tools/python3/src/Objects/clinic/floatobject.c.h b/contrib/tools/python3/src/Objects/clinic/floatobject.c.h
index b7554832b5..ae823cd0e4 100644
--- a/contrib/tools/python3/src/Objects/clinic/floatobject.c.h
+++ b/contrib/tools/python3/src/Objects/clinic/floatobject.c.h
@@ -38,42 +38,42 @@ float___trunc__(PyObject *self, PyObject *Py_UNUSED(ignored))
return float___trunc___impl(self);
}
-PyDoc_STRVAR(float___floor____doc__,
-"__floor__($self, /)\n"
-"--\n"
-"\n"
-"Return the floor as an Integral.");
-
-#define FLOAT___FLOOR___METHODDEF \
- {"__floor__", (PyCFunction)float___floor__, METH_NOARGS, float___floor____doc__},
-
-static PyObject *
-float___floor___impl(PyObject *self);
-
-static PyObject *
-float___floor__(PyObject *self, PyObject *Py_UNUSED(ignored))
-{
- return float___floor___impl(self);
-}
-
-PyDoc_STRVAR(float___ceil____doc__,
-"__ceil__($self, /)\n"
-"--\n"
-"\n"
-"Return the ceiling as an Integral.");
-
-#define FLOAT___CEIL___METHODDEF \
- {"__ceil__", (PyCFunction)float___ceil__, METH_NOARGS, float___ceil____doc__},
-
-static PyObject *
-float___ceil___impl(PyObject *self);
-
-static PyObject *
-float___ceil__(PyObject *self, PyObject *Py_UNUSED(ignored))
-{
- return float___ceil___impl(self);
-}
-
+PyDoc_STRVAR(float___floor____doc__,
+"__floor__($self, /)\n"
+"--\n"
+"\n"
+"Return the floor as an Integral.");
+
+#define FLOAT___FLOOR___METHODDEF \
+ {"__floor__", (PyCFunction)float___floor__, METH_NOARGS, float___floor____doc__},
+
+static PyObject *
+float___floor___impl(PyObject *self);
+
+static PyObject *
+float___floor__(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return float___floor___impl(self);
+}
+
+PyDoc_STRVAR(float___ceil____doc__,
+"__ceil__($self, /)\n"
+"--\n"
+"\n"
+"Return the ceiling as an Integral.");
+
+#define FLOAT___CEIL___METHODDEF \
+ {"__ceil__", (PyCFunction)float___ceil__, METH_NOARGS, float___ceil____doc__},
+
+static PyObject *
+float___ceil___impl(PyObject *self);
+
+static PyObject *
+float___ceil__(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return float___ceil___impl(self);
+}
+
PyDoc_STRVAR(float___round____doc__,
"__round__($self, ndigits=None, /)\n"
"--\n"
@@ -83,7 +83,7 @@ PyDoc_STRVAR(float___round____doc__,
"When an argument is passed, work like built-in round(x, ndigits).");
#define FLOAT___ROUND___METHODDEF \
- {"__round__", (PyCFunction)(void(*)(void))float___round__, METH_FASTCALL, float___round____doc__},
+ {"__round__", (PyCFunction)(void(*)(void))float___round__, METH_FASTCALL, float___round____doc__},
static PyObject *
float___round___impl(PyObject *self, PyObject *o_ndigits);
@@ -92,16 +92,16 @@ static PyObject *
float___round__(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
- PyObject *o_ndigits = Py_None;
+ PyObject *o_ndigits = Py_None;
- if (!_PyArg_CheckPositional("__round__", nargs, 0, 1)) {
+ if (!_PyArg_CheckPositional("__round__", nargs, 0, 1)) {
goto exit;
}
- if (nargs < 1) {
- goto skip_optional;
- }
- o_ndigits = args[0];
-skip_optional:
+ if (nargs < 1) {
+ goto skip_optional;
+ }
+ o_ndigits = args[0];
+skip_optional:
return_value = float___round___impl(self, o_ndigits);
exit:
@@ -212,14 +212,14 @@ float_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
!_PyArg_NoKeywords("float", kwargs)) {
goto exit;
}
- if (!_PyArg_CheckPositional("float", PyTuple_GET_SIZE(args), 0, 1)) {
+ if (!_PyArg_CheckPositional("float", PyTuple_GET_SIZE(args), 0, 1)) {
goto exit;
}
- if (PyTuple_GET_SIZE(args) < 1) {
- goto skip_optional;
- }
- x = PyTuple_GET_ITEM(args, 0);
-skip_optional:
+ if (PyTuple_GET_SIZE(args) < 1) {
+ goto skip_optional;
+ }
+ x = PyTuple_GET_ITEM(args, 0);
+skip_optional:
return_value = float_new_impl(type, x);
exit:
@@ -270,19 +270,19 @@ float___getformat__(PyTypeObject *type, PyObject *arg)
PyObject *return_value = NULL;
const char *typestr;
- if (!PyUnicode_Check(arg)) {
- _PyArg_BadArgument("__getformat__", "argument", "str", arg);
- goto exit;
- }
- Py_ssize_t typestr_length;
- typestr = PyUnicode_AsUTF8AndSize(arg, &typestr_length);
- if (typestr == NULL) {
- goto exit;
- }
- if (strlen(typestr) != (size_t)typestr_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
+ if (!PyUnicode_Check(arg)) {
+ _PyArg_BadArgument("__getformat__", "argument", "str", arg);
goto exit;
}
+ Py_ssize_t typestr_length;
+ typestr = PyUnicode_AsUTF8AndSize(arg, &typestr_length);
+ if (typestr == NULL) {
+ goto exit;
+ }
+ if (strlen(typestr) != (size_t)typestr_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
return_value = float___getformat___impl(type, typestr);
exit:
@@ -308,7 +308,7 @@ PyDoc_STRVAR(float___set_format____doc__,
"This affects how floats are converted to and from binary strings.");
#define FLOAT___SET_FORMAT___METHODDEF \
- {"__set_format__", (PyCFunction)(void(*)(void))float___set_format__, METH_FASTCALL|METH_CLASS, float___set_format____doc__},
+ {"__set_format__", (PyCFunction)(void(*)(void))float___set_format__, METH_FASTCALL|METH_CLASS, float___set_format____doc__},
static PyObject *
float___set_format___impl(PyTypeObject *type, const char *typestr,
@@ -321,35 +321,35 @@ float___set_format__(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs
const char *typestr;
const char *fmt;
- if (!_PyArg_CheckPositional("__set_format__", nargs, 2, 2)) {
- goto exit;
- }
- if (!PyUnicode_Check(args[0])) {
- _PyArg_BadArgument("__set_format__", "argument 1", "str", args[0]);
- goto exit;
- }
- Py_ssize_t typestr_length;
- typestr = PyUnicode_AsUTF8AndSize(args[0], &typestr_length);
- if (typestr == NULL) {
- goto exit;
- }
- if (strlen(typestr) != (size_t)typestr_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
- goto exit;
- }
- if (!PyUnicode_Check(args[1])) {
- _PyArg_BadArgument("__set_format__", "argument 2", "str", args[1]);
- goto exit;
- }
- Py_ssize_t fmt_length;
- fmt = PyUnicode_AsUTF8AndSize(args[1], &fmt_length);
- if (fmt == NULL) {
- goto exit;
- }
- if (strlen(fmt) != (size_t)fmt_length) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
+ if (!_PyArg_CheckPositional("__set_format__", nargs, 2, 2)) {
goto exit;
}
+ if (!PyUnicode_Check(args[0])) {
+ _PyArg_BadArgument("__set_format__", "argument 1", "str", args[0]);
+ goto exit;
+ }
+ Py_ssize_t typestr_length;
+ typestr = PyUnicode_AsUTF8AndSize(args[0], &typestr_length);
+ if (typestr == NULL) {
+ goto exit;
+ }
+ if (strlen(typestr) != (size_t)typestr_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
+ if (!PyUnicode_Check(args[1])) {
+ _PyArg_BadArgument("__set_format__", "argument 2", "str", args[1]);
+ goto exit;
+ }
+ Py_ssize_t fmt_length;
+ fmt = PyUnicode_AsUTF8AndSize(args[1], &fmt_length);
+ if (fmt == NULL) {
+ goto exit;
+ }
+ if (strlen(fmt) != (size_t)fmt_length) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto exit;
+ }
return_value = float___set_format___impl(type, typestr, fmt);
exit:
@@ -374,17 +374,17 @@ float___format__(PyObject *self, PyObject *arg)
PyObject *return_value = NULL;
PyObject *format_spec;
- if (!PyUnicode_Check(arg)) {
- _PyArg_BadArgument("__format__", "argument", "str", arg);
- goto exit;
- }
- if (PyUnicode_READY(arg) == -1) {
+ if (!PyUnicode_Check(arg)) {
+ _PyArg_BadArgument("__format__", "argument", "str", arg);
goto exit;
}
- format_spec = arg;
+ if (PyUnicode_READY(arg) == -1) {
+ goto exit;
+ }
+ format_spec = arg;
return_value = float___format___impl(self, format_spec);
exit:
return return_value;
}
-/*[clinic end generated code: output=25fbbe253f44e2df input=a9049054013a1b77]*/
+/*[clinic end generated code: output=25fbbe253f44e2df input=a9049054013a1b77]*/