summaryrefslogtreecommitdiff
path: root/doc/release
diff options
context:
space:
mode:
authorKai Striega <kaistriega@gmail.com>2020-01-22 08:49:41 +0800
committerSebastian Berg <sebastian@sipsolutions.net>2020-01-21 16:49:41 -0800
commite94cec800304a6a467cf90ce4e7d3e207770b4b4 (patch)
tree29f4c70b9b5dee5a95d1d03da59d73c510c85ae3 /doc/release
parent1d05717115990a1bd5dd547b70cd960354063702 (diff)
downloadnumpy-e94cec800304a6a467cf90ce4e7d3e207770b4b4.tar.gz
MAINT: Const qualify UFunc inner loops (gh-15355)
This PR const qualifies the dimension and strides arguments of PyUFuncGenericFunction. Const qualified arguments make it simpler to reason about the behaviour of these ufuncs and prevents accidental mutation. As the const is now required this PR also const qualifies calls to PyUFuncGenericFunction inside the NumPy source code. This closes #15252
Diffstat (limited to 'doc/release')
-rw-r--r--doc/release/upcoming_changes/15355.c_api.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/15355.c_api.rst b/doc/release/upcoming_changes/15355.c_api.rst
new file mode 100644
index 000000000..ffc1972cf
--- /dev/null
+++ b/doc/release/upcoming_changes/15355.c_api.rst
@@ -0,0 +1,7 @@
+Const qualify UFunc inner loops
+-------------------------------
+``UFuncGenericFunction`` now expects pointers to const ``dimension`` and
+``strides`` as arguments. This means inner loops may no longer modify
+either ``dimension`` or ``strides``. This change leads to an
+``incompatible-pointer-types`` warning forcing users to either ignore
+the compiler warnings or to const qualify their own loop signatures.