mirror of
https://github.com/python/cpython.git
synced 2025-07-22 18:55:22 +00:00
[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 2cdeb61b57
)
Co-authored-by: Peter Hawkins <hawkinsp@cs.stanford.edu>
This commit is contained in:
parent
acf05aa5d8
commit
78dfc28ff3
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
||||||
#ifndef Py_LIMITED_API
|
#ifndef Py_LIMITED_API
|
||||||
#ifndef Py_TRACEMALLOC_H
|
#ifndef Py_TRACEMALLOC_H
|
||||||
#define Py_TRACEMALLOC_H
|
#define Py_TRACEMALLOC_H
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Track an allocated memory block in the tracemalloc module.
|
/* Track an allocated memory block in the tracemalloc module.
|
||||||
Return 0 on success, return -1 on error (failed to allocate memory to store
|
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,
|
unsigned int domain,
|
||||||
uintptr_t ptr);
|
uintptr_t ptr);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif // !Py_TRACEMALLOC_H
|
#endif // !Py_TRACEMALLOC_H
|
||||||
#endif // !Py_LIMITED_API
|
#endif // !Py_LIMITED_API
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue