diff options
Diffstat (limited to 'contrib/tools/python3/Include')
| -rw-r--r-- | contrib/tools/python3/Include/cpython/pytime.h | 2 | ||||
| -rw-r--r-- | contrib/tools/python3/Include/internal/pycore_object.h | 5 | ||||
| -rw-r--r-- | contrib/tools/python3/Include/internal/pycore_pyerrors.h | 12 | ||||
| -rw-r--r-- | contrib/tools/python3/Include/patchlevel.h | 4 | ||||
| -rw-r--r-- | contrib/tools/python3/Include/pyconfig-linux.h | 11 | ||||
| -rw-r--r-- | contrib/tools/python3/Include/pyconfig-osx-arm64.h | 11 | ||||
| -rw-r--r-- | contrib/tools/python3/Include/pymacro.h | 9 | ||||
| -rw-r--r-- | contrib/tools/python3/Include/tracemalloc.h | 11 |
8 files changed, 47 insertions, 18 deletions
diff --git a/contrib/tools/python3/Include/cpython/pytime.h b/contrib/tools/python3/Include/cpython/pytime.h index 16d88d191e9..46cc97bd7cf 100644 --- a/contrib/tools/python3/Include/cpython/pytime.h +++ b/contrib/tools/python3/Include/cpython/pytime.h @@ -53,7 +53,7 @@ functions and constants extern "C" { #endif -#ifdef __clang__ +#if defined(__clang__) || defined(_MSC_VER) struct timeval; #endif diff --git a/contrib/tools/python3/Include/internal/pycore_object.h b/contrib/tools/python3/Include/internal/pycore_object.h index 546f98d96d3..de82d9e76f3 100644 --- a/contrib/tools/python3/Include/internal/pycore_object.h +++ b/contrib/tools/python3/Include/internal/pycore_object.h @@ -65,6 +65,11 @@ static inline void _Py_RefcntAdd(PyObject* op, Py_ssize_t n) _Py_AddRefTotal(_PyInterpreterState_GET(), n); #endif op->ob_refcnt += n; + + // Although the ref count was increased by `n` (which may be greater than 1) + // it is only a single increment (i.e. addition) operation, so only 1 refcnt + // increment operation is counted. + _Py_INCREF_STAT_INC(); } #define _Py_RefcntAdd(op, n) _Py_RefcntAdd(_PyObject_CAST(op), n) diff --git a/contrib/tools/python3/Include/internal/pycore_pyerrors.h b/contrib/tools/python3/Include/internal/pycore_pyerrors.h index 4620a269644..dab41405b92 100644 --- a/contrib/tools/python3/Include/internal/pycore_pyerrors.h +++ b/contrib/tools/python3/Include/internal/pycore_pyerrors.h @@ -75,6 +75,18 @@ PyAPI_FUNC(void) _PyErr_SetString( PyObject *exception, const char *string); +/* + * Set an exception with the error message decoded from the current locale + * encoding (LC_CTYPE). + * + * Exceptions occurring in decoding take priority over the desired exception. + * + * Exported for '_ctypes' shared extensions. + */ +PyAPI_FUNC(void) _PyErr_SetLocaleString( + PyObject *exception, + const char *string); + PyAPI_FUNC(PyObject *) _PyErr_Format( PyThreadState *tstate, PyObject *exception, diff --git a/contrib/tools/python3/Include/patchlevel.h b/contrib/tools/python3/Include/patchlevel.h index 6c597837da0..3a80c5f879c 100644 --- a/contrib/tools/python3/Include/patchlevel.h +++ b/contrib/tools/python3/Include/patchlevel.h @@ -18,12 +18,12 @@ /*--start constants--*/ #define PY_MAJOR_VERSION 3 #define PY_MINOR_VERSION 12 -#define PY_MICRO_VERSION 8 +#define PY_MICRO_VERSION 9 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "3.12.8" +#define PY_VERSION "3.12.9" /*--end constants--*/ /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. diff --git a/contrib/tools/python3/Include/pyconfig-linux.h b/contrib/tools/python3/Include/pyconfig-linux.h index 2eec3b5a21b..dd45eee1ad2 100644 --- a/contrib/tools/python3/Include/pyconfig-linux.h +++ b/contrib/tools/python3/Include/pyconfig-linux.h @@ -48,10 +48,6 @@ /* Define if --enable-ipv6 is specified */ #define ENABLE_IPV6 1 -/* Define to 1 if your system stores words within floats with the most - significant word first */ -/* #undef FLOAT_WORDS_BIGENDIAN */ - /* Define if getpgrp() must be called as getpgrp(0). */ /* #undef GETPGRP_HAVE_ARG */ @@ -1339,6 +1335,9 @@ /* Define to 1 if you have the <sys/param.h> header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the <sys/pidfd.h> header file. */ +/* #undef HAVE_SYS_PIDFD_H */ + /* Define to 1 if you have the <sys/poll.h> header file. */ #define HAVE_SYS_POLL_H 1 @@ -1439,8 +1438,8 @@ /* Define to 1 if you have the `truncate' function. */ #define HAVE_TRUNCATE 1 -/* Define to 1 if you have the `ttyname' function. */ -#define HAVE_TTYNAME 1 +/* Define to 1 if you have the `ttyname_r' function. */ +#define HAVE_TTYNAME_R 1 /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ diff --git a/contrib/tools/python3/Include/pyconfig-osx-arm64.h b/contrib/tools/python3/Include/pyconfig-osx-arm64.h index 81e4e3c15b3..7439801d017 100644 --- a/contrib/tools/python3/Include/pyconfig-osx-arm64.h +++ b/contrib/tools/python3/Include/pyconfig-osx-arm64.h @@ -48,10 +48,6 @@ /* Define if --enable-ipv6 is specified */ #define ENABLE_IPV6 1 -/* Define to 1 if your system stores words within floats with the most - significant word first */ -/* #undef FLOAT_WORDS_BIGENDIAN */ - /* Define if getpgrp() must be called as getpgrp(0). */ /* #undef GETPGRP_HAVE_ARG */ @@ -1337,6 +1333,9 @@ /* Define to 1 if you have the <sys/param.h> header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the <sys/pidfd.h> header file. */ +/* #undef HAVE_SYS_PIDFD_H */ + /* Define to 1 if you have the <sys/poll.h> header file. */ #define HAVE_SYS_POLL_H 1 @@ -1437,8 +1436,8 @@ /* Define to 1 if you have the `truncate' function. */ #define HAVE_TRUNCATE 1 -/* Define to 1 if you have the `ttyname' function. */ -#define HAVE_TTYNAME 1 +/* Define to 1 if you have the `ttyname_r' function. */ +#define HAVE_TTYNAME_R 1 /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ diff --git a/contrib/tools/python3/Include/pymacro.h b/contrib/tools/python3/Include/pymacro.h index d5700dc3893..94e6248d283 100644 --- a/contrib/tools/python3/Include/pymacro.h +++ b/contrib/tools/python3/Include/pymacro.h @@ -118,6 +118,15 @@ */ #if defined(__GNUC__) || defined(__clang__) # define Py_UNUSED(name) _unused_ ## name __attribute__((unused)) +#elif defined(_MSC_VER) + // Disable warning C4100: unreferenced formal parameter, + // declare the parameter, + // restore old compiler warnings. +# define Py_UNUSED(name) \ + __pragma(warning(push)) \ + __pragma(warning(suppress: 4100)) \ + _unused_ ## name \ + __pragma(warning(pop)) #else # define Py_UNUSED(name) _unused_ ## name #endif diff --git a/contrib/tools/python3/Include/tracemalloc.h b/contrib/tools/python3/Include/tracemalloc.h index 580027a8e36..2c88dbab7b8 100644 --- a/contrib/tools/python3/Include/tracemalloc.h +++ b/contrib/tools/python3/Include/tracemalloc.h @@ -1,7 +1,10 @@ #ifndef Py_TRACEMALLOC_H #define Py_TRACEMALLOC_H - #ifndef Py_LIMITED_API +#ifdef __cplusplus +extern "C" { +#endif + /* Track an allocated memory block in the tracemalloc module. Return 0 on success, return -1 on error (failed to allocate memory to store the trace). @@ -47,7 +50,7 @@ PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetTraces(void); PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetObjectTraceback(PyObject *obj); /* Initialize tracemalloc */ -PyAPI_FUNC(int) _PyTraceMalloc_Init(void); +PyAPI_FUNC(PyStatus) _PyTraceMalloc_Init(void); /* Start tracemalloc */ PyAPI_FUNC(int) _PyTraceMalloc_Start(int max_nframe); @@ -67,6 +70,8 @@ PyAPI_FUNC(PyObject *) _PyTraceMalloc_GetTracedMemory(void); /* Set the peak size of traced memory blocks to the current size */ PyAPI_FUNC(void) _PyTraceMalloc_ResetPeak(void); +#ifdef __cplusplus +} #endif - +#endif /* !Py_LIMITED_API */ #endif /* !Py_TRACEMALLOC_H */ |
