Coverage Report

Created: 2026-10-17 06:15

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cpython/Objects/clinic/fileobject.c.h
Line
Count
Source
1
/*[clinic input]
2
preserve
3
[clinic start generated code]*/
4
5
#include "pycore_modsupport.h"    // _PyArg_BadArgument()
6
7
PyDoc_STRVAR(stdprinter_write__doc__,
8
"write($self, text, /)\n"
9
"--\n"
10
"\n"
11
"Write the text to the stream.");
12
13
#define STDPRINTER_WRITE_METHODDEF    \
14
    {"write", (PyCFunction)stdprinter_write, METH_O, stdprinter_write__doc__},
15
16
static PyObject *
17
stdprinter_write_impl(PyStdPrinter_Object *self, PyObject *unicode);
18
19
static PyObject *
20
stdprinter_write(PyObject *self, PyObject *arg)
21
0
{
22
0
    PyObject *return_value = NULL;
23
0
    PyObject *unicode;
24
25
0
    if (!PyUnicode_Check(arg)) {
26
0
        _PyArg_BadArgument("write", "argument", "str", arg);
27
0
        goto exit;
28
0
    }
29
0
    unicode = arg;
30
0
    return_value = stdprinter_write_impl((PyStdPrinter_Object *)self, unicode);
31
32
0
exit:
33
0
    return return_value;
34
0
}
35
/*[clinic end generated code: output=7cf7d4c181518bbb input=a9049054013a1b77]*/