Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 10, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 31, 2024

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

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
Member

Choose a reason for hiding this comment

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

be?

Doc/c-api/gcsupport.rst Outdated Show resolved Hide resolved
@hugovk hugovk merged commit 4821f08 into python:main Feb 10, 2024
25 checks passed
@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Feb 10, 2024
@miss-islington-app
Copy link

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

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
@miss-islington-app
Copy link

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
Copy link

bedevere-app bot commented Feb 10, 2024

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 bug and security fixes label Feb 10, 2024
hugovk pushed a commit that referenced this pull request Feb 13, 2024
hugovk pushed a commit to hugovk/cpython that referenced this pull request Feb 13, 2024
@bedevere-app
Copy link

bedevere-app bot commented Feb 13, 2024

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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants