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 — bpo-40170: Convert PyObject_IS_GC() macro to a function by shihai1991 · Pull Request #19464 · python/cpython

bpo-40170: Convert PyObject_IS_GC() macro to a function #19464

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.

Sign up for GitHub

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

Merged
vstinner merged 14 commits into python:master from shihai1991:bpo_40170
Apr 14, 2020

Uh oh!

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

Merged

bpo-40170: Convert PyObject_IS_GC() macro to a function #19464

Changes from 1 commit
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
8bb1fab
Convert PyObject_IS_GC() macro to a function
shihai1991 Apr 10, 2020
be2bbab
Update 2020-04-11-06-12-44.bpo-40170.cmM9oK.rst
shihai1991 Apr 10, 2020
2cbeedb
resolve conflict
shihai1991 Apr 11, 2020
0783d0b
add _PyObject_IS_GC()
shihai1991 Apr 13, 2020
32c0acc
Resolve confilcts
shihai1991 Apr 13, 2020
c69d697
update docs
shihai1991 Apr 14, 2020
1dd8dd2
Update Doc/c-api/gcsupport.rst
shihai1991 Apr 14, 2020
176f8a0
Update Doc/c-api/gcsupport.rst
shihai1991 Apr 14, 2020
8d68011
update some descriptions
shihai1991 Apr 14, 2020
ee0525b
update docs
shihai1991 Apr 14, 2020
a4d1a37
fix typos
shihai1991 Apr 14, 2020
bdc61b9
remove _PyObject_IS_GC() to pycore_object.h
shihai1991 Apr 14, 2020
1c242b5
remove white space
shihai1991 Apr 14, 2020
cffba90
update news
shihai1991 Apr 14, 2020
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

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

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

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

Diff view
Diff view
Prev Previous commit
Next Next commit
resolve conflict
  • Loading branch information

Uh oh!

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

@shihai1991
shihai1991 committed Apr 11, 2020
commit 2cbeedb4aa0e12105f38ae5e0ec79bce9610e215

There are no files selected for viewing

20 changes: 20 additions & 0 deletions 20 Doc/c-api/gcsupport.rst
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,33 @@ Constructors for container types must conform to two rules:
followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, usually near the
end of the constructor.


.. c:function:: int PyObject_IS_GC(PyObject *obj)
Comment thread
shihai1991 marked this conversation as resolved.
Resolved

Uh oh!

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


Return non-zero if the object have GC head. Return zero otherwise.
Comment thread
shihai1991 marked this conversation as resolved.
Resolved

Uh oh!

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


.. versionadded:: 3.9
Comment thread
shihai1991 marked this conversation as resolved.
Resolved

Uh oh!

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



.. c:function:: int PyObject_GC_IsTracked(PyObject *op)

Returns 1 if the object type of *op* implements the GC protocol and *op* is being
currently tracked by the garbage collector and 0 otherwise.

This is analogous to the Python function :func:`gc.is_tracked`.

.. versionadded:: 3.9


.. c:function:: int PyObject_GC_IsFinalized(PyObject *op)

Returns 1 if the object type of *op* implements the GC protocol and *op* has been
already finalized by the garbage collector and 0 otherwise.

This is analogous to the Python function :func:`gc.is_finalized`.

.. versionadded:: 3.9

Similarly, the deallocator for the object must conform to a similar pair of
rules:

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
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 01402520 — 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.