[Python-checkins] bpo-43816: Add extern "C" to Include/cpython/pyctype.h (GH-25365)

vstinner webhook-mailer at python.org
Tue Apr 13 07:27:32 EDT 2021


https://github.com/python/cpython/commit/54db51c9114ac49030832f5134979ca866ffd21c
commit: 54db51c9114ac49030832f5134979ca866ffd21c
branch: master
author: Andrew V. Jones <andrewvaughanj at gmail.com>
committer: vstinner <vstinner at python.org>
date: 2021-04-13T13:27:21+02:00
summary:

bpo-43816: Add extern "C" to Include/cpython/pyctype.h (GH-25365)

Signed-off-by: Andrew V. Jones <andrew.jones at vector.com>

files:
M Include/cpython/pyctype.h

diff --git a/Include/cpython/pyctype.h b/Include/cpython/pyctype.h
index 6bce63eeb63b8..729d93275e6c5 100644
--- a/Include/cpython/pyctype.h
+++ b/Include/cpython/pyctype.h
@@ -1,6 +1,9 @@
 #ifndef Py_LIMITED_API
 #ifndef PYCTYPE_H
 #define PYCTYPE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #define PY_CTF_LOWER  0x01
 #define PY_CTF_UPPER  0x02
@@ -29,5 +32,8 @@ PyAPI_DATA(const unsigned char) _Py_ctype_toupper[256];
 #define Py_TOLOWER(c) (_Py_ctype_tolower[Py_CHARMASK(c)])
 #define Py_TOUPPER(c) (_Py_ctype_toupper[Py_CHARMASK(c)])
 
+#ifdef __cplusplus
+}
+#endif
 #endif /* !PYCTYPE_H */
 #endif /* !Py_LIMITED_API */



More information about the Python-checkins mailing list