Skip to content

Commit 6174fca

Browse files
committed
Decorate BytesIO.peek with @critical_section
1 parent 08bd7da commit 6174fca

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Modules/_io/bytesio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ _io_BytesIO_read1_impl(bytesio *self, Py_ssize_t size)
511511

512512

513513
/*[clinic input]
514+
@critical_section
514515
_io.BytesIO.peek
515516
size: Py_ssize_t = 1
516517
/
@@ -523,7 +524,7 @@ Return an empty bytes object at EOF.
523524

524525
static PyObject *
525526
_io_BytesIO_peek_impl(bytesio *self, Py_ssize_t size)
526-
/*[clinic end generated code: output=fa4d8ce28b35db9b input=1510f0fcf77c0048]*/
527+
/*[clinic end generated code: output=fa4d8ce28b35db9b input=36dc9805d333fe24]*/
527528
{
528529
CHECK_CLOSED(self);
529530

Modules/_io/clinic/bytesio.c.h

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)