Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit117a19e

Browse files
committed
Small cleanups
1 parent7815db2 commit117a19e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎Include/refcount.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ PyAPI_FUNC(void) _Py_DecRefSharedDebug(PyObject *, const char *, int);
287287
// zero. Otherwise, the thread gives up ownership and merges the reference
288288
// count fields.
289289
PyAPI_FUNC(void)_Py_MergeZeroLocalRefcount(PyObject*);
290-
291290
#endif
292291

293292
#if defined(Py_LIMITED_API)&& (Py_LIMITED_API+0 >=0x030c0000|| defined(Py_REF_DEBUG))

‎Objects/dictobject.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7110,7 +7110,7 @@ try_set_dict_inline_only_or_other_dict(PyObject *obj, PyObject *new_dict, PyDict
71107110
// We have a materialized dict which doesn't point at the inline values,
71117111
// We get to simply swap dictionaries and free the old dictionary.
71127112
FT_ATOMIC_STORE_PTR(_PyObject_ManagedDictPointer(obj)->dict,
7113-
(PyDictObject*)Py_XNewRef(new_dict));
7113+
(PyDictObject*)Py_XNewRef(new_dict));
71147114
replaced= true;
71157115
gotoexit_lock;
71167116
}
@@ -7166,7 +7166,11 @@ static int
71667166
set_or_clear_managed_dict(PyObject*obj,PyObject*new_dict,boolclear)
71677167
{
71687168
assert(Py_TYPE(obj)->tp_flags&Py_TPFLAGS_MANAGED_DICT);
7169+
#ifndefNDEBUG
7170+
Py_BEGIN_CRITICAL_SECTION(obj);
71697171
assert(_PyObject_InlineValuesConsistencyCheck(obj));
7172+
Py_END_CRITICAL_SECTION
7173+
#endif
71707174
interr=0;
71717175
PyTypeObject*tp=Py_TYPE(obj);
71727176
if (tp->tp_flags&Py_TPFLAGS_INLINE_VALUES) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp