]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42882: Fix MSVC warnings in pystate.c (GH-24440)
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Thu, 4 Feb 2021 22:08:03 +0000 (06:08 +0800)
committerGitHub <noreply@github.com>
Thu, 4 Feb 2021 22:08:03 +0000 (23:08 +0100)
_PyRuntimeState.unicode_ids.next_index type is Py_ssize_t.

Python/pystate.c

index ebf76a058b640220d8b36634e2c4e375a0633447..922e5bee2cbfcacda0240eb8fd0427167fcfef27 100644 (file)
@@ -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));