summaryrefslogtreecommitdiff
path: root/Include/internal/pycore_lifecycle.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-09 13:03:37 +0100
committerGitHub <noreply@github.com>2018-11-09 13:03:37 +0100
commit130893debfd97c70e3a89d9ba49892f53e6b9d79 (patch)
tree35b45b8939a9ab75ec470f0defb37d1ee1f8c77e /Include/internal/pycore_lifecycle.h
parent0a18e0510a145427d8ff1864a011c81ea02cdcd4 (diff)
downloadcpython-git-130893debfd97c70e3a89d9ba49892f53e6b9d79.tar.gz
bpo-35081: Internal headers require Py_BUILD_CORE (GH-10363)
* All internal header files now require Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN to be defined. * _json.c is now compiled with Py_BUILD_CORE_BUILTIN to access pycore_accu.h header. * Add an example to Modules/Setup to show how to build _json as a built-in module; it requires non trivial compiler options.
Diffstat (limited to 'Include/internal/pycore_lifecycle.h')
-rw-r--r--Include/internal/pycore_lifecycle.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/internal/pycore_lifecycle.h b/Include/internal/pycore_lifecycle.h
index cf36440eab..e10431690c 100644
--- a/Include/internal/pycore_lifecycle.h
+++ b/Include/internal/pycore_lifecycle.h
@@ -4,8 +4,8 @@
extern "C" {
#endif
-#ifndef Py_BUILD_CORE
-# error "Py_BUILD_CORE must be defined to include this header"
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
#endif
PyAPI_FUNC(int) _Py_UnixMain(int argc, char **argv);