From 31f2a419764a8ba77c2a970cfc80056c6cd06756 Mon Sep 17 00:00:00 2001 From: shadchin Date: Mon, 12 Feb 2024 07:53:52 +0300 Subject: Update Python from 3.11.8 to 3.12.2 --- contrib/tools/python3/src/Include/cpython/modsupport.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'contrib/tools/python3/src/Include/cpython/modsupport.h') diff --git a/contrib/tools/python3/src/Include/cpython/modsupport.h b/contrib/tools/python3/src/Include/cpython/modsupport.h index 205e1742439..2259291aff6 100644 --- a/contrib/tools/python3/src/Include/cpython/modsupport.h +++ b/contrib/tools/python3/src/Include/cpython/modsupport.h @@ -34,11 +34,13 @@ PyAPI_FUNC(int) _PyArg_NoPositional(const char *funcname, PyObject *args); #define _PyArg_NoPositional(funcname, args) \ ((args) == NULL || _PyArg_NoPositional((funcname), (args))) +#define _Py_ANY_VARARGS(n) ((n) == PY_SSIZE_T_MAX) + PyAPI_FUNC(void) _PyArg_BadArgument(const char *, const char *, const char *, PyObject *); PyAPI_FUNC(int) _PyArg_CheckPositional(const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t); #define _PyArg_CheckPositional(funcname, nargs, min, max) \ - ((!ANY_VARARGS(max) && (min) <= (nargs) && (nargs) <= (max)) \ + ((!_Py_ANY_VARARGS(max) && (min) <= (nargs) && (nargs) <= (max)) \ || _PyArg_CheckPositional((funcname), (nargs), (min), (max))) PyAPI_FUNC(PyObject **) _Py_VaBuildStack( @@ -49,6 +51,7 @@ PyAPI_FUNC(PyObject **) _Py_VaBuildStack( Py_ssize_t *p_nargs); typedef struct _PyArg_Parser { + int initialized; const char *format; const char * const *keywords; const char *fname; @@ -98,11 +101,9 @@ PyAPI_FUNC(PyObject * const *) _PyArg_UnpackKeywordsWithVararg( #define _PyArg_UnpackKeywords(args, nargs, kwargs, kwnames, parser, minpos, maxpos, minkw, buf) \ (((minkw) == 0 && (kwargs) == NULL && (kwnames) == NULL && \ - (minpos) <= (nargs) && (nargs) <= (maxpos) && args != NULL) ? (args) : \ + (minpos) <= (nargs) && (nargs) <= (maxpos) && (args) != NULL) ? (args) : \ _PyArg_UnpackKeywords((args), (nargs), (kwargs), (kwnames), (parser), \ (minpos), (maxpos), (minkw), (buf))) PyAPI_FUNC(PyObject *) _PyModule_CreateInitialized(PyModuleDef*, int apiver); PyAPI_FUNC(int) _PyModule_Add(PyObject *, const char *, PyObject *); - -PyAPI_DATA(const char *) _Py_PackageContext; -- cgit v1.3