Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 21, 2018

  • 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