Mailing List Archive

bpo-45893: Add missing extern C to initconfig.h (GH-29761)
https://github.com/python/cpython/commit/f4afc53bf68c8ded20b281cd1baa88a679b4a3fd
commit: f4afc53bf68c8ded20b281cd1baa88a679b4a3fd
branch: main
author: Christian Heimes <christian@python.org>
committer: tiran <christian@python.org>
date: 2021-11-24T21:12:12+01:00
summary:

bpo-45893: Add missing extern C to initconfig.h (GH-29761)

Co-authored-by: Steve Dower <steve.dower@python.org>

files:
M .github/workflows/build.yml
M Include/cpython/initconfig.h

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a11a368fd8311..fe4b14828699c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -95,6 +95,8 @@ jobs:
runs-on: windows-latest
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
+ env:
+ IncludeUwp: 'true'
steps:
- uses: actions/checkout@v2
- name: Build CPython
@@ -109,6 +111,8 @@ jobs:
runs-on: windows-latest
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
+ env:
+ IncludeUwp: 'true'
steps:
- uses: actions/checkout@v2
- name: Register MSVC problem matcher
diff --git a/Include/cpython/initconfig.h b/Include/cpython/initconfig.h
index 05641001bcd74..76f3c5268ee5f 100644
--- a/Include/cpython/initconfig.h
+++ b/Include/cpython/initconfig.h
@@ -1,6 +1,9 @@
#ifndef Py_PYCORECONFIG_H
#define Py_PYCORECONFIG_H
#ifndef Py_LIMITED_API
+#ifdef __cplusplus
+extern "C" {
+#endif

/* --- PyStatus ----------------------------------------------- */

@@ -243,5 +246,8 @@ PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
See also PyConfig.orig_argv. */
PyAPI_FUNC(void) Py_GetArgcArgv(int *argc, wchar_t ***argv);

+#ifdef __cplusplus
+}
+#endif
#endif /* !Py_LIMITED_API */
#endif /* !Py_PYCORECONFIG_H */

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins
bpo-45893: Add missing extern C to initconfig.h (GH-29761) [ In reply to ]
https://github.com/python/cpython/commit/cd85d91bc66a587ce2ba668c897a5ecf118733cc
commit: cd85d91bc66a587ce2ba668c897a5ecf118733cc
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
committer: miss-islington <31488909+miss-islington@users.noreply.github.com>
date: 2021-11-24T13:57:41-08:00
summary:

bpo-45893: Add missing extern C to initconfig.h (GH-29761)


Co-authored-by: Steve Dower <steve.dower@python.org>
(cherry picked from commit f4afc53bf68c8ded20b281cd1baa88a679b4a3fd)

Co-authored-by: Christian Heimes <christian@python.org>

files:
M .github/workflows/build.yml
M Include/cpython/initconfig.h

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 88f825e613bca..01b75aedafed5 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -115,6 +115,8 @@ jobs:
runs-on: windows-latest
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
+ env:
+ IncludeUwp: 'true'
steps:
- uses: actions/checkout@v2
- name: Build CPython
@@ -129,6 +131,8 @@ jobs:
runs-on: windows-latest
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
+ env:
+ IncludeUwp: 'true'
steps:
- uses: actions/checkout@v2
- name: Register MSVC problem matcher
diff --git a/Include/cpython/initconfig.h b/Include/cpython/initconfig.h
index 09f9a2947efef..583165bee48cc 100644
--- a/Include/cpython/initconfig.h
+++ b/Include/cpython/initconfig.h
@@ -1,6 +1,9 @@
#ifndef Py_PYCORECONFIG_H
#define Py_PYCORECONFIG_H
#ifndef Py_LIMITED_API
+#ifdef __cplusplus
+extern "C" {
+#endif

/* --- PyStatus ----------------------------------------------- */

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

+#ifdef __cplusplus
+}
+#endif
#endif /* !Py_LIMITED_API */
#endif /* !Py_PYCORECONFIG_H */

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins