Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-35059: Convert _PyObject_GC_TRACK() to inline function#10643

Merged
vstinner merged 1 commit into
python:masterpython/cpython:masterfrom
vstinner:inline_gc_trackCopy head branch name to clipboard
Nov 22, 2018
Merged

bpo-35059: Convert _PyObject_GC_TRACK() to inline function#10643
vstinner merged 1 commit into
python:masterpython/cpython:masterfrom
vstinner:inline_gc_trackCopy head branch name to clipboard

Conversation

@vstinner

@vstinner vstinner commented Nov 21, 2018

Copy link
Copy Markdown
Member
  • PyObject_GC_Track() now calls _PyObject_AssertFailed(), instead of
    Py_FatalError(), if the object is already tracked, to dump more
    information.
  • _PyObject_GC_TRACK() no longer checks if the object is already
    tracked at runtime: only PyObject_GC_Track() still implements this
    check at runtime. _PyObject_GC_TRACK() now uses an assertion
    instead, for best performances.
  • Convert _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros to
    inline functions.

https://bugs.python.org/issue35059

* Add _PyObject_ASSERT_FROM() and _PyObject_ASSERT_FAILED_MSG()
  macros.
* PyObject_GC_Track() now calls _PyObject_ASSERT_FAILED_MSG(),
  instead of Py_FatalError(), if the object is already tracked, to
  dump more information.
* _PyObject_GC_TRACK() no longer checks if the object is already
  tracked at runtime, use an assertion instead for best performances;
  only PyObject_GC_Track() still implements this check at runtime.
* pycore_object.h now includes pycore_pystate.h.
* Convert _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros to
  inline functions.
@vstinner vstinner merged commit 271753a into python:master Nov 22, 2018
@vstinner vstinner deleted the inline_gc_track branch November 22, 2018 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.