File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,16 @@ familiar with writing an extension before attempting to embed Python in a real
3030application.
3131
3232
33+ Language version compatibility
34+ ==============================
35+
36+ Python's C API is compatible with C11 and C++11 versions of C and C++.
37+
38+ This is a lower limit: the C API does not require features from later
39+ C/C++ versions.
40+ You do *not * need to enable your compiler's "c11 mode".
41+
42+
3343Coding standards
3444================
3545
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ def test_build_c11(self):
3838
3939 @unittest .skipIf (support .MS_WINDOWS , "MSVC doesn't support /std:c99" )
4040 def test_build_c99 (self ):
41+ # In public docs, we say C API is compatible with C11. However,
42+ # in practice we do maintain C99 compatibility in public headers.
43+ # Please ask the C API WG before adding a new C11-only feature.
4144 self .check_build ('_test_c99_cext' , std = 'c99' )
4245
4346 @support .requires_gil_enabled ('incompatible with Free Threading' )
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ def test_build(self):
2929 self .check_build ('_testcppext' )
3030
3131 def test_build_cpp03 (self ):
32+ # In public docs, we say C API is compatible with C++11. However,
33+ # in practice we do maintain C++03 compatibility in public headers.
34+ # Please ask the C API WG before adding a new C++11-only feature.
3235 self .check_build ('_testcpp03ext' , std = 'c++03' )
3336
3437 @unittest .skipIf (support .MS_WINDOWS , "MSVC doesn't support /std:c++11" )
You can’t perform that action at this time.
0 commit comments