diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/tools/python3/src/Modules/clinic/_tracemalloc.c.h | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Modules/clinic/_tracemalloc.c.h')
-rw-r--r-- | contrib/tools/python3/src/Modules/clinic/_tracemalloc.c.h | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/contrib/tools/python3/src/Modules/clinic/_tracemalloc.c.h b/contrib/tools/python3/src/Modules/clinic/_tracemalloc.c.h index 049cacd832..53757ee698 100644 --- a/contrib/tools/python3/src/Modules/clinic/_tracemalloc.c.h +++ b/contrib/tools/python3/src/Modules/clinic/_tracemalloc.c.h @@ -84,7 +84,7 @@ PyDoc_STRVAR(_tracemalloc_start__doc__, "trace to nframe."); #define _TRACEMALLOC_START_METHODDEF \ - {"start", (PyCFunction)(void(*)(void))_tracemalloc_start, METH_FASTCALL, _tracemalloc_start__doc__}, + {"start", (PyCFunction)(void(*)(void))_tracemalloc_start, METH_FASTCALL, _tracemalloc_start__doc__}, static PyObject * _tracemalloc_start_impl(PyObject *module, int nframe); @@ -95,22 +95,22 @@ _tracemalloc_start(PyObject *module, PyObject *const *args, Py_ssize_t nargs) PyObject *return_value = NULL; int nframe = 1; - if (!_PyArg_CheckPositional("start", nargs, 0, 1)) { + if (!_PyArg_CheckPositional("start", nargs, 0, 1)) { goto exit; } - if (nargs < 1) { - goto skip_optional; - } - if (PyFloat_Check(args[0])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } - nframe = _PyLong_AsInt(args[0]); - if (nframe == -1 && PyErr_Occurred()) { - goto exit; - } -skip_optional: + if (nargs < 1) { + goto skip_optional; + } + if (PyFloat_Check(args[0])) { + PyErr_SetString(PyExc_TypeError, + "integer argument expected, got float" ); + goto exit; + } + nframe = _PyLong_AsInt(args[0]); + if (nframe == -1 && PyErr_Occurred()) { + goto exit; + } +skip_optional: return_value = _tracemalloc_start_impl(module, nframe); exit: @@ -197,24 +197,24 @@ _tracemalloc_get_traced_memory(PyObject *module, PyObject *Py_UNUSED(ignored)) { return _tracemalloc_get_traced_memory_impl(module); } - -PyDoc_STRVAR(_tracemalloc_reset_peak__doc__, -"reset_peak($module, /)\n" -"--\n" -"\n" -"Set the peak size of memory blocks traced by tracemalloc to the current size.\n" -"\n" -"Do nothing if the tracemalloc module is not tracing memory allocations."); - -#define _TRACEMALLOC_RESET_PEAK_METHODDEF \ - {"reset_peak", (PyCFunction)_tracemalloc_reset_peak, METH_NOARGS, _tracemalloc_reset_peak__doc__}, - -static PyObject * -_tracemalloc_reset_peak_impl(PyObject *module); - -static PyObject * -_tracemalloc_reset_peak(PyObject *module, PyObject *Py_UNUSED(ignored)) -{ - return _tracemalloc_reset_peak_impl(module); -} -/*[clinic end generated code: output=a130117b1af821da input=a9049054013a1b77]*/ + +PyDoc_STRVAR(_tracemalloc_reset_peak__doc__, +"reset_peak($module, /)\n" +"--\n" +"\n" +"Set the peak size of memory blocks traced by tracemalloc to the current size.\n" +"\n" +"Do nothing if the tracemalloc module is not tracing memory allocations."); + +#define _TRACEMALLOC_RESET_PEAK_METHODDEF \ + {"reset_peak", (PyCFunction)_tracemalloc_reset_peak, METH_NOARGS, _tracemalloc_reset_peak__doc__}, + +static PyObject * +_tracemalloc_reset_peak_impl(PyObject *module); + +static PyObject * +_tracemalloc_reset_peak(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return _tracemalloc_reset_peak_impl(module); +} +/*[clinic end generated code: output=a130117b1af821da input=a9049054013a1b77]*/ |