aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>2021-02-05 06:08:03 +0800
committerGitHub <noreply@github.com>2021-02-04 23:08:03 +0100
commit196d4deaf4810a0bba75ba537dd40f2d71a5a634 (patch)
treed6fcde7ebfde8b990799bdcc5a5b1032e2a0d9ec
parentFix signed/unsigned comparison to avoid compilation warning (GH-24441) (diff)
downloadcpython-196d4deaf4810a0bba75ba537dd40f2d71a5a634.tar.gz
cpython-196d4deaf4810a0bba75ba537dd40f2d71a5a634.tar.bz2
cpython-196d4deaf4810a0bba75ba537dd40f2d71a5a634.zip
bpo-42882: Fix MSVC warnings in pystate.c (GH-24440)
_PyRuntimeState.unicode_ids.next_index type is Py_ssize_t.
-rw-r--r--Python/pystate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index ebf76a058b6..922e5bee2cb 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -56,7 +56,7 @@ _PyRuntimeState_Init_impl(_PyRuntimeState *runtime)
_Py_AuditHookEntry *audit_hook_head = runtime->audit_hook_head;
// bpo-42882: Preserve next_index value if Py_Initialize()/Py_Finalize()
// is called multiple times.
- int64_t unicode_next_index = runtime->unicode_ids.next_index;
+ Py_ssize_t unicode_next_index = runtime->unicode_ids.next_index;
memset(runtime, 0, sizeof(*runtime));