Skip to content

Commit adb5e13

Browse files
committed
Fix increment
1 parent 2d3e018 commit adb5e13

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Include/internal/pycore_dict.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,10 @@ dict_next_version(PyInterpreterState *interp)
231231
PyThreadState *tstate = PyThreadState_GET();
232232
uint64_t cur_progress = (tstate->dict_global_version &
233233
(THREAD_LOCAL_DICT_VERSION_BATCH - 1));
234-
235234
if (cur_progress == 0) {
236235
uint64_t next = _Py_atomic_add_uint64(&interp->dict_state.global_version,
237236
THREAD_LOCAL_DICT_VERSION_BATCH);
238-
tstate->dict_global_version = next + THREAD_LOCAL_DICT_VERSION_BATCH;
239-
return next;
237+
tstate->dict_global_version = next;
240238
}
241239
return tstate->dict_global_version += DICT_VERSION_INCREMENT;
242240
}

0 commit comments

Comments
 (0)