mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
This allows compiling extension modules with -Wswitch-enum on gcc. Initial patch by Floris Bruynooghe.
This commit is contained in:
parent
b1e58fe43f
commit
8d40f16a60
3 changed files with 9 additions and 2 deletions
|
|
@ -64,7 +64,8 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order)
|
|||
case _Py_memory_order_seq_cst:
|
||||
_Py_ANNOTATE_HAPPENS_BEFORE(address);
|
||||
break;
|
||||
default:
|
||||
case _Py_memory_order_relaxed:
|
||||
case _Py_memory_order_acquire:
|
||||
break;
|
||||
}
|
||||
switch(order) {
|
||||
|
|
@ -73,7 +74,8 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order)
|
|||
case _Py_memory_order_seq_cst:
|
||||
_Py_ANNOTATE_HAPPENS_AFTER(address);
|
||||
break;
|
||||
default:
|
||||
case _Py_memory_order_relaxed:
|
||||
case _Py_memory_order_release:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue