From e472b854654e7766b4c45b54191992f92211ce15 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 17 Jul 2021 17:07:24 +0800 Subject: [PATCH 1/2] Fix MSVC warnings in getargs.c --- Python/getargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/getargs.c b/Python/getargs.c index 330f2b456b3873..0ed7858faec023 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2552,7 +2552,7 @@ _PyArg_UnpackKeywordsWithVararg(PyObject *const *args, Py_ssize_t nargs, } /* copy keyword args using kwtuple to drive process */ - for (i = Py_MAX((int)nargs, posonly) - varargssize; i < maxargs; i++) { + for (i = Py_MAX((int)nargs, posonly) - (int)varargssize; i < maxargs; i++) { if (nkwargs) { keyword = PyTuple_GET_ITEM(kwtuple, i - posonly); if (kwargs != NULL) { From 6c1b377ac911391fc9e98c487c1e64bf9c900096 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 17 Jul 2021 18:09:53 +0800 Subject: [PATCH 2/2] apply suggestions Co-Authored-By: Batuhan Taskaya --- Python/getargs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Python/getargs.c b/Python/getargs.c index 0ed7858faec023..3fab3b5efefc28 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2552,7 +2552,8 @@ _PyArg_UnpackKeywordsWithVararg(PyObject *const *args, Py_ssize_t nargs, } /* copy keyword args using kwtuple to drive process */ - for (i = Py_MAX((int)nargs, posonly) - (int)varargssize; i < maxargs; i++) { + for (i = Py_MAX((int)nargs, posonly) - + Py_SAFE_DOWNCAST(varargssize, Py_ssize_t, int); i < maxargs; i++) { if (nkwargs) { keyword = PyTuple_GET_ITEM(kwtuple, i - posonly); if (kwargs != NULL) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy