Skip to content

Commit cd85d91

Browse files
bpo-45893: Add missing extern C to initconfig.h (GH-29761)
Co-authored-by: Steve Dower <steve.dower@python.org> (cherry picked from commit f4afc53) Co-authored-by: Christian Heimes <christian@python.org>
1 parent 8cabcde commit cd85d91

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ jobs:
115115
runs-on: windows-latest
116116
needs: check_source
117117
if: needs.check_source.outputs.run_tests == 'true'
118+
env:
119+
IncludeUwp: 'true'
118120
steps:
119121
- uses: actions/checkout@v2
120122
- name: Build CPython
@@ -129,6 +131,8 @@ jobs:
129131
runs-on: windows-latest
130132
needs: check_source
131133
if: needs.check_source.outputs.run_tests == 'true'
134+
env:
135+
IncludeUwp: 'true'
132136
steps:
133137
- uses: actions/checkout@v2
134138
- name: Register MSVC problem matcher

Include/cpython/initconfig.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef Py_PYCORECONFIG_H
22
#define Py_PYCORECONFIG_H
33
#ifndef Py_LIMITED_API
4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
47

58
/* --- PyStatus ----------------------------------------------- */
69

@@ -239,5 +242,8 @@ PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
239242
See also PyConfig.orig_argv. */
240243
PyAPI_FUNC(void) Py_GetArgcArgv(int *argc, wchar_t ***argv);
241244

245+
#ifdef __cplusplus
246+
}
247+
#endif
242248
#endif /* !Py_LIMITED_API */
243249
#endif /* !Py_PYCORECONFIG_H */

0 commit comments

Comments
 (0)