Coverage Report

Created: 2022-07-08 09:39

/home/mdboom/Work/builds/cpython/Objects/clinic/structseq.c.h
Line
Count
Source
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
structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10
{
11
    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
    Py_ssize_t nargs = PyTuple_GET_SIZE(args);
17
    Py_ssize_t noptargs = nargs + (kwargs ? 
PyDict_GET_SIZE6
(kwargs) :
014.1k
) - 1;
  Branch (17:36): [True: 6, False: 14.1k]
18
    PyObject *arg;
19
    PyObject *dict = NULL;
20
21
    fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf);
22
    if (!fastargs) {
  Branch (22:9): [True: 1, False: 14.1k]
23
        goto exit;
24
    }
25
    arg = fastargs[0];
26
    if (!noptargs) {
  Branch (26:9): [True: 14.0k, False: 123]
27
        goto skip_optional_pos;
28
    }
29
    dict = fastargs[1];
30
skip_optional_pos:
31
    return_value = structseq_new_impl(type, arg, dict);
32
33
exit:
34
    return return_value;
35
}
36
/*[clinic end generated code: output=ed3019acf49b656c input=a9049054013a1b77]*/