]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-127902: Make sure `extern "C"` is closed when using Py_LIMITED_API (#127904)
authorDmitry Shachnev <mitya57@users.noreply.github.com>
Fri, 13 Dec 2024 11:18:28 +0000 (14:18 +0300)
committerGitHub <noreply@github.com>
Fri, 13 Dec 2024 11:18:28 +0000 (11:18 +0000)
Fixes #127902.

Include/tracemalloc.h

index b6865f1f6835cb21c4637dbd66b3c5634ce3eba6..4db34b9509e7e21a75844d10694b23ea7f414b8c 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef Py_TRACEMALLOC_H
 #define Py_TRACEMALLOC_H
+#ifndef Py_LIMITED_API
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef Py_LIMITED_API
 /* Track an allocated memory block in the tracemalloc module.
    Return 0 on success, return -1 on error (failed to allocate memory to store
    the trace).