Skip to content

gh-101100: Fix sphinx warnings in c-api/gcsupport.rst - #114786

Merged
hugovk merged 2 commits into
python:mainfrom
sobolevn:issue-101100-gcsupport
Feb 10, 2024
Merged

hugovk merged 2 commits into
python:mainfrom
sobolevn:issue-101100-gcsupport

Conversation

@sobolevn

@sobolevn sobolevn commented Jan 31, 2024 •

Copy link
Copy Markdown
Member

Before:

/Users/sobolev/Desktop/cpython2/Doc/c-api/gcsupport.rst:86: WARNING: c:identifier reference target not found: TYPE
/Users/sobolev/Desktop/cpython2/Doc/c-api/gcsupport.rst:86: WARNING: c:identifier reference target not found: TYPE

I think that PyObject_GC_Resize should be documented as a macro. Because it is:

cpython/Include/objimpl.h

Lines 179 to 180 in c8cf5d7

#define PyObject_GC_Resize(type, op, n) \
( (type *) _PyObject_GC_Resize(_PyVarObject_CAST(op), (n)) )

Previous error was correct, there's no such thing as TYPE outside of the macro context.


📚 Documentation preview 📚: https://cpython-previews--114786.org.readthedocs.build/en/114786/c-api/gcsupport.html#c.PyObject_GC_Resize

Comment thread Doc/c-api/gcsupport.rst Outdated
Returns the resized object of type ``TYPE*`` (refers to any C type)
or ``NULL`` on failure.

*op* must of type :c:expr:`PyVarObject *`

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.

be?

Comment thread Doc/c-api/gcsupport.rst Resolved
@hugovk
hugovk merged commit 4821f08 into python:main Feb 10, 2024
@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Feb 10, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @sobolevn for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

Thanks @sobolevn for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 10, 2024
…GH-114786)

(cherry picked from commit 4821f08)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@miss-islington-app

Copy link
Copy Markdown

Sorry, @sobolevn and @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 4821f08674e290a396d27aa8256fd5b8a121f3d6 3.11
@bedevere-app

bedevere-app Bot commented Feb 10, 2024

Copy link
Copy Markdown

GH-115263 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Feb 10, 2024
hugovk pushed a commit that referenced this pull request Feb 13, 2024
…4786) (#115263)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
hugovk pushed a commit to hugovk/cpython that referenced this pull request Feb 13, 2024
…ythonGH-114786)

(cherry picked from commit 4821f08)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-app

bedevere-app Bot commented Feb 13, 2024

Copy link
Copy Markdown

GH-115430 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Feb 13, 2024
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
hugovk added a commit that referenced this pull request Feb 14, 2024
…4786) (#115430)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

3 participants