Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevnsobolevn 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:

#definePyObject_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 *`

Choose a reason for hiding this comment

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

be?

@hugovkhugovk merged commit 4821f08 into python:mainFeb 10, 2024
@hugovkhugovk 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

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
…GH-114786) (cherry picked from commit 4821f08) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@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

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

@bedevere-appbedevere-appbot 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
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
Copy link

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

@bedevere-appbedevere-appbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@sobolevn@hugovk@serhiy-storchaka