summaryrefslogtreecommitdiffstats
path: root/Tests/FindPython/NumPy/arraytest.c
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2024-03-04 06:22:07 (GMT)
committerBrad King <brad.king@kitware.com>2024-03-08 14:49:03 (GMT)
commite563201f9e33f6d35e8b12de4ec7a1a36724087d (patch)
treec57a6add1322cc7f30e16e019e0d871b1901a2a6 /Tests/FindPython/NumPy/arraytest.c
parentdebf777290433e5aa074cb5e51fa12c46598f829 (diff)
downloadCMake-e563201f9e33f6d35e8b12de4ec7a1a36724087d.zip
CMake-e563201f9e33f6d35e8b12de4ec7a1a36724087d.tar.gz
CMake-e563201f9e33f6d35e8b12de4ec7a1a36724087d.tar.bz2
cmList: Use ptrdiff_t for index_type
In commit 87fe031a07 (cmList class: various enhancements, 2023-04-26, v3.27.0-rc1~142^2~1) this changed from `int` to `intptr_t`, but on some systems (e.g. CHERI-enabled Arm or RISC-V), `intptr_t` is larger than 64 bits and using it for `index_type` here incurs an unnecessary performance penalty. Additionally, using `intptr_t` here results in an ambiguous overload while calling `cmStrCat` with `intptr_t`: `error: conversion from '__intcap' to 'const cmAlphaNum' is ambiguous`. Instead of adding `intptr_t` overloads for `cmAlphaNum` for CHERI systems, we can change the type to `ptrdiff_t` (which will be the same as `intptr_t` on all other systems) and avoid carrying diffs that only compile with a CHERI enabled compiler.
Diffstat (limited to 'Tests/FindPython/NumPy/arraytest.c')
0 files changed, 0 insertions, 0 deletions