Skip to content

bpo-35081: Move accu.h to Include/internal/pycore_accu.h #10271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2018
Merged

bpo-35081: Move accu.h to Include/internal/pycore_accu.h #10271

merged 1 commit into from
Nov 1, 2018

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