Skip to content

Commit 3949428

Browse files
authored
bpo-43754: Fix compiler warning in Python/compile.c (GH-25855)
This fixes the following warning: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
1 parent c2931d3 commit 3949428

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6144,7 +6144,7 @@ compiler_pattern_or(struct compiler *c, pattern_ty p, pattern_context *pc)
61446144
// - A copy of the subject.
61456145
// - Anything else that may be on top of the stack.
61466146
// - Any previous stores we've already stashed away on the stack.
6147-
int nrots = nstores + 1 + pc->on_top + PyList_GET_SIZE(pc->stores);
6147+
Py_ssize_t nrots = nstores + 1 + pc->on_top + PyList_GET_SIZE(pc->stores);
61486148
for (Py_ssize_t i = 0; i < nstores; i++) {
61496149
// Rotate this capture to its proper place on the stack:
61506150
if (!compiler_addop_i(c, ROT_N, nrots)) {

0 commit comments

Comments
 (0)