← 输入框|github.com|刷新
Skip to content

Doc: Fix allocator mismatch in PyStatus example - #160757

Merged
methane merged 1 commit into
python:mainfrom
methane:fix-capi-initconfig
Oct 28, 2026
Merged

methane merged 1 commit into
python:mainfrom
methane:fix-capi-initconfig

Conversation

@methane

@methane methane commented Oct 27, 2026

Copy link
Copy Markdown
Member

No description provided.

@methane
methane requested a review from vstinner October 27, 2026 11:17
@methane methane added the docs Documentation in the Doc dir label Oct 27, 2026
@methane
methane requested a review from FFY00 as a code owner October 27, 2026 11:17
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Oct 27, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35440176 | 📁 Comparing 374191a against main (085d366)

  🔍 Preview build  

1 file changed
± c-api/init_config.html

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused correction matches the allocator contract and leaves no unresolved review findings.

No open issues 🎉

What changed in this PR

This PR corrects the allocator pairing in the C API documentation’s PyStatus example.

Changes:

  • Replaces PyMem_Free(ptr) with PyMem_RawFree(ptr) to match the allocation API used by the example.
File Description
Doc/​c-api/​init_config.rst Corrects the deallocation call in the PyStatus example.

Review effort: Balanced

@StanFromIreland StanFromIreland changed the title Doc: Fix allocator mismatch in PyStatus example Doc: Fix allocator mismatch in PyStatus example Oct 27, 2026

@vstinner vstinner left a comment

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.

LGTM. It's good that at least one person read the doc that I wrote long time ago 😅

@methane
methane merged commit 495fef1 into python:main Oct 28, 2026
48 checks passed
@methane
methane deleted the fix-capi-initconfig branch October 28, 2026 02:46
@miss-islington-app

Copy link
Copy Markdown

Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Oct 28, 2026
@bedevere-app

bedevere-app Bot commented Oct 28, 2026

Copy link
Copy Markdown

GH-160797 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 28, 2026
@bedevere-app

bedevere-app Bot commented Oct 28, 2026

Copy link
Copy Markdown

GH-160798 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 28, 2026
methane added a commit that referenced this pull request Oct 28, 2026
(cherry picked from commit 495fef1)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
methane added a commit that referenced this pull request Oct 28, 2026
(cherry picked from commit 495fef1)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants