*** Its definition may be changed or removed at any moment.
***/
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
+
/*
* A two-level accumulator of unicode objects that avoids both the overhead
* of keeping a huge number of small separate objects, and the quadratic
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
#include "dynamic_annotations.h"
extern "C" {
#endif
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
+
#include "pycore_atomic.h"
#include "pythread.h"
#ifndef Py_INTERNAL_CONDVAR_H
#define Py_INTERNAL_CONDVAR_H
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
+
#ifndef _POSIX_THREADS
/* This means pthreads are not implemented in libc headers, hence the macro
not present in unistd.h. But they still can be implemented as an external
#ifndef Py_INTERNAL_CONTEXT_H
#define Py_INTERNAL_CONTEXT_H
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
#include "pycore_hamt.h"
-
struct _pycontextobject {
PyObject_HEAD
PyContext *ctx_prev;
int _PyContext_Init(void);
void _PyContext_Fini(void);
-
#endif /* !Py_INTERNAL_CONTEXT_H */
#ifndef Py_INTERNAL_PYGETOPT_H
#define Py_INTERNAL_PYGETOPT_H
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
+
extern int _PyOS_opterr;
extern int _PyOS_optind;
extern wchar_t *_PyOS_optarg;
extern "C" {
#endif
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
+
#include "pycore_condvar.h"
#include "pycore_atomic.h"
#ifndef Py_INTERNAL_HAMT_H
#define Py_INTERNAL_HAMT_H
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
#define _Py_HAMT_MAX_TREE_DEPTH 7
#ifndef Py_INTERNAL_HASH_H
#define Py_INTERNAL_HASH_H
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
+
uint64_t _Py_KeyedHash(uint64_t, const char *, Py_ssize_t);
#endif
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);
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 defined"
#endif
#include "objimpl.h"
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(void) _Py_wstrlist_clear(
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
#include "pystate.h"
extern "C" {
#endif
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
+
#include "object.h"
struct _warnings_runtime_state {
#_bisect _bisectmodule.c # Bisection algorithms
#_heapq _heapqmodule.c # Heap queue algorithm
#_asyncio _asynciomodule.c # Fast asyncio Future
+#_json -I$(srcdir)/Include/internal -DPy_BUILD_CORE_BUILTIN _json.c # _json speedups
#unicodedata unicodedata.c # static Unicode character database
# atexit
exts.append( Extension("atexit", ["atexitmodule.c"]) )
# _json speedups
- exts.append( Extension("_json", ["_json.c"]) )
+ exts.append( Extension("_json", ["_json.c"],
+ # pycore_accu.h requires Py_BUILD_CORE_BUILTIN
+ extra_compile_args=['-DPy_BUILD_CORE_BUILTIN']) )
# Python C API test module
exts.append( Extension('_testcapi', ['_testcapimodule.c'],
depends=['testcapi_long.h']) )