https://github.com/python/cpython/commit/78dfc28ff3594caeff37a3f8c93a590f463fc3fe commit: 78dfc28ff3594caeff37a3f8c93a590f463fc3fe branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: vstinner <[email protected]> date: 2024-12-11T14:07:44+01:00 summary:
[3.13] Add `extern "C"` around `PyTraceMalloc_` functions. (GH-127772) (#127815) Add `extern "C"` around `PyTraceMalloc_` functions. (GH-127772) Pretty much everything else exported by Python.h has an extern "C" annotation, yet this header appears to be missing one. (cherry picked from commit 2cdeb61b57e638ae46a04386330a12abe9cddf2c) Co-authored-by: Peter Hawkins <[email protected]> files: M Include/cpython/tracemalloc.h diff --git a/Include/cpython/tracemalloc.h b/Include/cpython/tracemalloc.h index 61a16ea9a9f3eb..6d094291ae2e90 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 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
