GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [WIP] bpo-35134: Create Include/pycapi/ subdirectory by vstinner · Pull Request #10285 · python/cpython

Conversation

@vstinner

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

Uh oh!

There was an error while loading. Please reload this page.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
bpo-35134: Create Include/pycapi/ subdirectory
bd7b24b
* 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
@vstinner vstinner added the DO-NOT-MERGE label Nov 1, 2018
@vstinner
vstinner requested review from ericsnowcurrently, ncoghlan and serhiy-storchaka November 1, 2018 13:04
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Nov 1, 2018
@bedevere-bot bedevere-bot added the awaiting merge label Nov 1, 2018
@vstinner vstinner mentioned this pull request Nov 1, 2018
bpo-35081: Rename internal headers #10275
Merged
vstinner
vstinner commented Nov 1, 2018
View reviewed changes
Comment thread Include/pycapi/pycapi_objimpl.h
#ifdef __cplusplus
extern "C" {
#endif

@vstinner vstinner Nov 1, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ncoghlan ncoghlan Nov 5, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
serhiy-storchaka
serhiy-storchaka reviewed Nov 1, 2018
View reviewed changes
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);

@serhiy-storchaka serhiy-storchaka Nov 1, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner

vstinner commented Nov 20, 2018

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner closed this Nov 20, 2018
@vstinner
vstinner deleted the pycapi branch November 20, 2018 22:38
@vstinner vstinner mentioned this pull request Nov 22, 2018
bpo-35134: Create Include/cpython/ subdirectory #10624
Merged
@vstinner vstinner mentioned this pull request Apr 10, 2022
Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details #79315
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka left review comments
@ncoghlan ncoghlan Awaiting requested review from ncoghlan
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting merge DO-NOT-MERGE

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@vstinner @ncoghlan @serhiy-storchaka @the-knights-who-say-ni @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.