Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Include/dynamic_annotations.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ int RunningOnValgrind(void);

#if DYNAMIC_ANNOTATIONS_ENABLED != 0 && defined(__cplusplus)

extern "C++" {
/* _Py_ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads.
Instead of doing
Expand All @@ -476,6 +477,8 @@ 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 { \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix ``dynamic_annotations.h`` header file when built with C++ and Valgrind:
add ``extern "C++" scope`` for the C++ template. Patch by Victor Stinner.
Loading