File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99#include "pycore_modsupport.h" // _PyArg_UnpackStack()
1010#include "pycore_object.h" // _PyObject_GC_UNTRACK()
1111#include "pycore_object_deferred.h" // _PyObject_SetDeferredRefcount()
12- #include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_LOAD_PTR_ACQUIRE()
1312#include "pycore_pystate.h" // _PyThreadState_GET()
1413#include "pycore_tuple.h" // _PyTuple_ITEMS()
1514
@@ -622,23 +621,13 @@ static PyObject *
622621descr_get_qualname (PyObject * self , void * Py_UNUSED (ignored ))
623622{
624623 PyDescrObject * descr = (PyDescrObject * )self ;
625-
626- PyObject * qualname = FT_ATOMIC_LOAD_PTR_ACQUIRE (descr -> d_qualname );
627- if (qualname != NULL ) {
628- return Py_NewRef (qualname );
629- }
630-
624+ PyObject * qualname ;
631625 Py_BEGIN_CRITICAL_SECTION (self );
632- qualname = FT_ATOMIC_LOAD_PTR_RELAXED (descr -> d_qualname );
633- if (qualname == NULL ) {
634- qualname = calculate_qualname (descr );
635- if (qualname != NULL ) {
636- FT_ATOMIC_STORE_PTR_RELEASE (descr -> d_qualname , qualname );
637- }
626+ if (descr -> d_qualname == NULL ) {
627+ descr -> d_qualname = calculate_qualname (descr );
638628 }
639- Py_XINCREF ( qualname );
629+ qualname = Py_XNewRef ( descr -> d_qualname );
640630 Py_END_CRITICAL_SECTION ();
641-
642631 return qualname ;
643632}
644633
You can’t perform that action at this time.
0 commit comments