Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r98302:36cf5ebfa3ec Date: 2019-12-16 19:25 +0100 http://bitbucket.org/pypy/pypy/changeset/36cf5ebfa3ec/
Log: oops, fix for 853267f08f60: the final update of cached_types should occur while we still have the lock (maybe it works anyway because of the GIL, but better safe than sorry) diff --git a/pypy/module/_cffi_backend/realize_c_type.py b/pypy/module/_cffi_backend/realize_c_type.py --- a/pypy/module/_cffi_backend/realize_c_type.py +++ b/pypy/module/_cffi_backend/realize_c_type.py @@ -452,9 +452,10 @@ "really need support for your case.") x = realize_c_type_or_func_now(ffi, op, opcodes, index) - if from_ffi: - assert ffi.cached_types[index] is None or ffi.cached_types[index] is x - ffi.cached_types[index] = x + if from_ffi: + old = ffi.cached_types[index] + assert old is None or old is x + ffi.cached_types[index] = x return x _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit