mirror of
https://github.com/python/cpython.git
synced 2026-01-05 23:12:38 +00:00
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.
(cherry picked from commit 2cdeb61b57)
Co-authored-by: Peter Hawkins <hawkinsp@cs.stanford.edu>
This commit is contained in:
parent
0964f9f184
commit
65bca19db5
1 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
#ifndef Py_TRACEMALLOC_H
|
||||
#define Py_TRACEMALLOC_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
/* Track an allocated memory block in the tracemalloc module.
|
||||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue