LCOV - code coverage report
Current view: top level - Objects/clinic - structseq.c.h (source / functions) Hit Total Coverage
Test: CPython 3.12 LCOV report [commit acb105a7c1f] Lines: 16 16 100.0 %
Date: 2022-07-20 13:12:14 Functions: 1 1 100.0 %
Branches: 11 14 78.6 %

           Branch data     Line data    Source code
       1                 :            : /*[clinic input]
       2                 :            : preserve
       3                 :            : [clinic start generated code]*/
       4                 :            : 
       5                 :            : static PyObject *
       6                 :            : structseq_new_impl(PyTypeObject *type, PyObject *arg, PyObject *dict);
       7                 :            : 
       8                 :            : static PyObject *
       9                 :      29148 : structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
      10                 :            : {
      11                 :      29148 :     PyObject *return_value = NULL;
      12                 :            :     static const char * const _keywords[] = {"sequence", "dict", NULL};
      13                 :            :     static _PyArg_Parser _parser = {NULL, _keywords, "structseq", 0};
      14                 :            :     PyObject *argsbuf[2];
      15                 :            :     PyObject * const *fastargs;
      16                 :      29148 :     Py_ssize_t nargs = PyTuple_GET_SIZE(args);
      17         [ +  + ]:      29148 :     Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 1;
      18                 :            :     PyObject *arg;
      19                 :      29148 :     PyObject *dict = NULL;
      20                 :            : 
      21   [ +  +  +  -  :      29148 :     fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf);
             +  -  +  - ]
      22         [ +  + ]:      29148 :     if (!fastargs) {
      23                 :          1 :         goto exit;
      24                 :            :     }
      25                 :      29147 :     arg = fastargs[0];
      26         [ +  + ]:      29147 :     if (!noptargs) {
      27                 :      29024 :         goto skip_optional_pos;
      28                 :            :     }
      29                 :        123 :     dict = fastargs[1];
      30                 :      29147 : skip_optional_pos:
      31                 :      29147 :     return_value = structseq_new_impl(type, arg, dict);
      32                 :            : 
      33                 :      29148 : exit:
      34                 :      29148 :     return return_value;
      35                 :            : }
      36                 :            : /*[clinic end generated code: output=ed3019acf49b656c input=a9049054013a1b77]*/

Generated by: LCOV version 1.14