Created originally on Bitbucket by Devin Jeanpierre
Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.
Existing Python programs may (okay, do) use symbols from structmember.h, and this works in CPython because structmember.h is not included from Python.h. Not so, in PyPy.
Rough breakdown of changes:
- Where Python.h is included by .c files, also include structmember.h
- Add pypy_structmember_decl.h file which is included by structmember.h
- Allow
@cpython_api
functions to change which headers they are added to.
The first two are very manual and icky, and I don't like how I did them. It feels like a hack. But I'm not sure of a better way to do it without more substantive rewrites.
The last part was an API changes to cpython_api
, so very invasive, but clean. Maybe the implementation is dumb.
One last note: The header file being added in copy_header_files()
doesn't seem to matter. I left it in anyway "just in case". Does it matter?