python3.11/Python-3.8.0-c++.patch
2023-04-20 00:20:40 +03:00

19 lines
874 B
Diff

diff -up Python-3.8.0/Include/dynamic_annotations.h.omv~ Python-3.8.0/Include/dynamic_annotations.h
--- Python-3.8.0/Include/dynamic_annotations.h.omv~ 2019-11-03 21:12:44.032504529 +0100
+++ Python-3.8.0/Include/dynamic_annotations.h 2019-11-03 21:13:44.009529546 +0100
@@ -460,6 +460,7 @@ int RunningOnValgrind(void);
#endif
#if DYNAMIC_ANNOTATIONS_ENABLED != 0 && defined(__cplusplus)
+extern "C++" { // We might be included from an extern "C" block...
/* _Py_ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads.
@@ -476,6 +477,7 @@ int RunningOnValgrind(void);
_Py_ANNOTATE_IGNORE_READS_END();
return res;
}
+}
/* Apply _Py_ANNOTATE_BENIGN_RACE_SIZED to a static variable. */
#define _Py_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) \
namespace { \