Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 1, 2018

The accu.h header is no longer part of the Python C API: it has been
moved to the "internal" headers which are restricted to Python
itself.

Replace #include "accu.h" with #include "pycore_accu.h".

https://bugs.python.org/issue35081

The accu.h header is no longer part of the Python C API: it has been
moved to the "internal" headers which are restricted to Python
itself.

Replace #include "accu.h" with #include "pycore_accu.h".
@vstinner
Copy link
Member Author

vstinner commented Nov 1, 2018

I tried to enforce to require Py_BUILD_CORE in pycore_accu.h to be defined using:

#ifndef Py_BUILD_CORE
#  error "Py_BUILD_CORE must be defined to include this header"
#endif

But the compilation of the _json module failed, because it isn't compiled with Py_BUILD_CORE. Moreover, _json.c contains:

/* Core extension modules are built-in on some platforms (e.g. Windows). */
#ifdef Py_BUILD_CORE
#define Py_BUILD_CORE_BUILTIN
#undef Py_BUILD_CORE
#endif

@vstinner vstinner merged commit e281f7d into python:master Nov 1, 2018
@vstinner vstinner deleted the accu branch November 1, 2018 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants