Skip to content

Commit 325c241

Browse files
committed
not locking bytes
1 parent 0ad9800 commit 325c241

File tree

2 files changed

+15
-23
lines changed

2 files changed

+15
-23
lines changed

Modules/arraymodule.c

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,11 +1803,20 @@ array_array_tolist_impl(arrayobject *self)
18031803
}
18041804

18051805

1806+
/*[clinic input]
1807+
@critical_section
1808+
array.array.frombytes
1809+
1810+
bytes: object
1811+
/
1812+
1813+
Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method.
1814+
[clinic start generated code]*/
1815+
18061816
static PyObject *
1807-
array_array_frombytes_lock_held(arrayobject *self, PyObject *bytes)
1817+
array_array_frombytes_impl(arrayobject *self, PyObject *bytes)
1818+
/*[clinic end generated code: output=8a48da6fa2f9dcde input=1758523e88df5d98]*/
18081819
{
1809-
_Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(self);
1810-
_Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(bytes);
18111820
Py_buffer buffer = {NULL, NULL};
18121821
if (PyObject_GetBuffer(bytes, &buffer, PyBUF_SIMPLE) != 0) {
18131822
return NULL;
@@ -1845,23 +1854,6 @@ array_array_frombytes_lock_held(arrayobject *self, PyObject *bytes)
18451854
Py_RETURN_NONE;
18461855
}
18471856

1848-
/*[clinic input]
1849-
@critical_section self bytes
1850-
array.array.frombytes
1851-
1852-
bytes: object
1853-
/
1854-
1855-
Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method.
1856-
[clinic start generated code]*/
1857-
1858-
static PyObject *
1859-
array_array_frombytes_impl(arrayobject *self, PyObject *bytes)
1860-
/*[clinic end generated code: output=8a48da6fa2f9dcde input=f8d97acc9f269f7b]*/
1861-
{
1862-
return array_array_frombytes_lock_held(self, bytes);
1863-
}
1864-
18651857
/*[clinic input]
18661858
@critical_section
18671859
array.array.tobytes

Modules/clinic/arraymodule.c.h

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

0 commit comments

Comments
 (0)