aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-06-11 22:37:53 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-06-20 16:24:45 -0400
commitaa48cdcf60fee61eeee5bd5a9915bb6e91b6ec39 (patch)
tree8c4bb491229d665bde4669a54dff5c964be9afe4 /mesonbuild
parent85e0c0a5d77f506c565c596990c212011868ae80 (diff)
downloadmeson-aa48cdcf60fee61eeee5bd5a9915bb6e91b6ec39.zip
meson-aa48cdcf60fee61eeee5bd5a9915bb6e91b6ec39.tar.gz
meson-aa48cdcf60fee61eeee5bd5a9915bb6e91b6ec39.tar.bz2
use truncating division for code that explicitly needs an int
We are going to truncate it down below with int() anyway, no need to carry extra precision. And mypy complains if the type changes between float and int.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/backend/ninjabackend.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 283493b..257d7d6 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -114,7 +114,7 @@ def get_rsp_threshold():
# single argument; see MAX_ARG_STRLEN
limit = 131072
# Be conservative
- limit = limit / 2
+ limit = limit // 2
return int(os.environ.get('MESON_RSP_THRESHOLD', limit))
# a conservative estimate of the command-line length limit