Skip to content

Commit 8af6be7

Browse files
committed
requested changes
1 parent 8198469 commit 8af6be7

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

Lib/test/test_array.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,11 +1683,6 @@ class FreeThreadingTest(unittest.TestCase):
16831683

16841684
def setUp(self):
16851685
self.enterContext(warnings.catch_warnings())
1686-
warnings.filterwarnings(
1687-
"ignore",
1688-
message="The 'u' type code is deprecated and "
1689-
"will be removed in Python 3.16",
1690-
category=DeprecationWarning)
16911686

16921687
def check(self, funcs, a=None, *args):
16931688
if a is None:

Modules/arraymodule.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "pycore_modsupport.h" // _PyArg_NoKeywords()
1616
#include "pycore_moduleobject.h" // _PyModule_GetState()
1717
#include "pycore_pyatomic_ft_wrappers.h"
18-
#include "pycore_pymem.h" // _PyMem_FreeDelayed
18+
#include "pycore_pymem.h" // _PyMem_FreeDelayed()
1919
#include "pycore_weakref.h" // FT_CLEAR_WEAKREFS()
2020

2121
#include <stddef.h> // offsetof()
@@ -79,7 +79,7 @@ static Py_ssize_t
7979
PyArray_GET_SIZE(PyObject *op) {
8080
arrayobject *ao = (arrayobject *)op;
8181
#ifdef Py_GIL_DISABLED
82-
return _Py_atomic_load_ssize_relaxed(&(_PyVarObject_CAST(ao)->ob_size));
82+
return FT_ATOMIC_LOAD_SSIZE_RELAXED(_PyVarObject_CAST(ao)->ob_size);
8383
#else
8484
return Py_SIZE(ao);
8585
#endif
@@ -231,8 +231,7 @@ array_resize(arrayobject *self, Py_ssize_t newsize)
231231
// Ensure that the array is freed using QSBR if we are not the
232232
// owning thread.
233233
if (!_Py_IsOwnedByCurrentThread((PyObject *)self) &&
234-
!_PyObject_GC_IS_SHARED(self))
235-
{
234+
!_PyObject_GC_IS_SHARED(self)) {
236235
_PyObject_GC_SET_SHARED(self);
237236
}
238237
#endif

0 commit comments

Comments
 (0)