FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[WIP] bpo-35134: Create Include/pycapi/ subdirectory by vstinner · Pull Request #10285 · python/cpython · GitHub

/ cpython Public

[WIP] bpo-35134: Create Include/pycapi/ subdirectory - #10285

Closed
vstinner wants to merge 1 commit into
python:masterfrom
vstinner:pycapi
Closed

[WIP] bpo-35134: Create Include/pycapi/ subdirectory#10285
vstinner wants to merge 1 commit into
python:masterfrom
vstinner:pycapi

Conversation

vstinner commented Nov 1, 2018
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member
  • Create Include/pycapi/ subdirectory
  • "make install" now creates $prefix/include/pycapi and copy
    Include/pycapi/* to $prefix/include/pycapi
  • Create Include/pycapi/pycapi_objimpl.h: move objimpl.h code
    surrounded by #ifndef Py_LIMITED_API to pycapi_objimpl.h.
  • objimpl.h includes pycapi/pycapi_objimpl.h

https://bugs.python.org/issue35134

* Create Include/pycapi/ subdirectory
* "make install" now creates $prefix/include/pycapi and copy
  Include/pycapi/* to $prefix/include/pycapi
* Create Include/pycapi/pycapi_objimpl.h: move objimpl.h code
  surrounded by #ifndef Py_LIMITED_API to pycapi_objimpl.h.
* objimpl.h includes pycapi/pycapi_objimpl.h
#ifdef __cplusplus
extern "C" {
#endif

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I wanted to add:

#ifdef Py_LIMITED_API
#  error "Py_LIMITED_API must not be defined to include this header"
#endif

But this header should be include if Py_LIMITED_API is defined with a value.

ncoghlan Nov 5, 2018
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If you don't move PyObject_Calloc (because it's in the stable ABI in 3.5+), then you can add that guard to the unstable ABI header.

Comment thread Include/objimpl.h
*/
PyAPI_FUNC(void *) PyObject_Malloc(size_t size);
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
PyAPI_FUNC(void *) PyObject_Calloc(size_t nelem, size_t elsize);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It is in the stable API (since version 3.5). It should not be moved.

The same is for other functions, added to the stable API after 3.2.

Copy link
Copy Markdown
Member Author

I abandon this PR: moving PyObject_Calloc() was wrong, and "pycapi" name is too generic: I created a new PR #10624.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

5 participants


Back | FazBrowse Home | New Git URL