diff options
author | Peter Hawkins <hawkinsp@cs.stanford.edu> | 2024-12-11 09:27:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-11 09:27:07 (GMT) |
commit | 2cdeb61b57e638ae46a04386330a12abe9cddf2c (patch) | |
tree | 8233e664292e377ed6038e2b657093623859d786 /Include | |
parent | db9bea0386c1c0b6c9d7c66474cda7e47e4b56f5 (diff) | |
download | cpython-2cdeb61b57e638ae46a04386330a12abe9cddf2c.zip cpython-2cdeb61b57e638ae46a04386330a12abe9cddf2c.tar.gz cpython-2cdeb61b57e638ae46a04386330a12abe9cddf2c.tar.bz2 |
Add `extern "C"` around `PyTraceMalloc_` functions. (#127772)
Pretty much everything else exported by Python.h has an extern "C"
annotation, yet this header appears to be missing one.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/tracemalloc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/cpython/tracemalloc.h b/Include/cpython/tracemalloc.h index 61a16ea..6d09429 100644 --- a/Include/cpython/tracemalloc.h +++ b/Include/cpython/tracemalloc.h @@ -1,6 +1,9 @@ #ifndef Py_LIMITED_API #ifndef Py_TRACEMALLOC_H #define Py_TRACEMALLOC_H +#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 @@ -22,5 +25,8 @@ PyAPI_FUNC(int) PyTraceMalloc_Untrack( unsigned int domain, uintptr_t ptr); +#ifdef __cplusplus +} +#endif #endif // !Py_TRACEMALLOC_H #endif // !Py_LIMITED_API |