| 1 |
/*[clinic input] |
| 2 |
preserve |
| 3 |
[clinic start generated code]*/ |
| 4 |
|
| 5 |
PyDoc_STRVAR(_testcapi_pyfile_newstdprinter__doc__, |
| 6 |
"pyfile_newstdprinter($module, fd, /)\n" |
| 7 |
"--\n" |
| 8 |
"\n"); |
| 9 |
|
| 10 |
#define _TESTCAPI_PYFILE_NEWSTDPRINTER_METHODDEF \ |
| 11 |
{"pyfile_newstdprinter", (PyCFunction)_testcapi_pyfile_newstdprinter, METH_O, _testcapi_pyfile_newstdprinter__doc__}, |
| 12 |
|
| 13 |
static PyObject * |
| 14 |
_testcapi_pyfile_newstdprinter_impl(PyObject *module, int fd); |
| 15 |
|
| 16 |
static PyObject * |
| 17 |
_testcapi_pyfile_newstdprinter(PyObject *module, PyObject *arg) |
| 18 |
{ |
| 19 |
PyObject *return_value = NULL; |
| 20 |
int fd; |
| 21 |
|
| 22 |
fd = PyLong_AsInt(arg); |
| 23 |
if (fd == -1 && PyErr_Occurred()) { |
| 24 |
goto exit; |
| 25 |
} |
| 26 |
return_value = _testcapi_pyfile_newstdprinter_impl(module, fd); |
| 27 |
|
| 28 |
exit: |
| 29 |
return return_value; |
| 30 |
} |
| 31 |
/*[clinic end generated code: output=44002184a5d9dbb9 input=a9049054013a1b77]*/ |