summaryrefslogtreecommitdiffstats
path: root/Include/pyatomic.h
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2011-11-19 20:03:10 (GMT)
committerPetri Lehtinen <petri@digip.org>2011-11-19 20:03:10 (GMT)
commit8d40f16a6021dc7fbba1bdc1bbda27ea1e955777 (patch)
tree6d65e13091565475b90799bf16304317427e7781 /Include/pyatomic.h
parentb1e58fe43f14ccf0a67589142ea643493b348c2b (diff)
downloadcpython-8d40f16a6021dc7fbba1bdc1bbda27ea1e955777.zip
cpython-8d40f16a6021dc7fbba1bdc1bbda27ea1e955777.tar.gz
cpython-8d40f16a6021dc7fbba1bdc1bbda27ea1e955777.tar.bz2
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.
Diffstat (limited to 'Include/pyatomic.h')
-rw-r--r--Include/pyatomic.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Include/pyatomic.h b/Include/pyatomic.h
index b0028fd..da45327 100644
--- a/Include/pyatomic.h
+++ b/Include/pyatomic.h
@@ -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;
}
}