Skip to content

bpo-35081: Move _PyObject_GC_TRACK() to pycore_object.h #10272

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

Closed
wants to merge 1 commit into from
Closed

bpo-35081: Move _PyObject_GC_TRACK() to pycore_object.h #10272

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 1, 2018

  • Create Include/internal/pycore_object.h
  • Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros to
    pycore_object.h
  • Remove _PyGC_generation0: replaced with _PyRuntime.gc.generation0
  • Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack()
    in _queuemodule.c. The file is compiled without Py_BUILD_CORE.
  • Add #include "pycore_object.h" in all C files using
    _PyObject_GC_TRACK() and/or _PyObject_GC_UNTRACK()

https://bugs.python.org/issue35081

* Create Include/internal/pycore_object.h
* Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros to
  pycore_object.h
* Remove _PyGC_generation0: replaced with _PyRuntime.gc.generation0
* Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack()
  in _queuemodule.c. The file is compiled without Py_BUILD_CORE.
* Add #include "pycore_object.h" in all C files using
  _PyObject_GC_TRACK() and/or _PyObject_GC_UNTRACK()
@vstinner
Copy link
Member Author

vstinner commented Nov 1, 2018

This PR changes 33 C files add the pycore_object.h include:

  • Modules/_io/bufferedio.c
  • Modules/_io/bytesio.c
  • Modules/_io/fileio.c
  • Modules/_io/iobase.c
  • Modules/_io/stringio.c
  • Modules/_io/textio.c
  • Modules/_io/winconsoleio.c
  • Modules/_queuemodule.c
  • Modules/gcmodule.c
  • Objects/bytearrayobject.c
  • Objects/bytesobject.c
  • Objects/call.c
  • Objects/cellobject.c
  • Objects/classobject.c
  • Objects/descrobject.c
  • Objects/dictobject.c
  • Objects/exceptions.c
  • Objects/frameobject.c
  • Objects/funcobject.c
  • Objects/genobject.c
  • Objects/iterobject.c
  • Objects/listobject.c
  • Objects/memoryobject.c
  • Objects/methodobject.c
  • Objects/odictobject.c
  • Objects/setobject.c
  • Objects/sliceobject.c
  • Objects/tupleobject.c
  • Objects/typeobject.c
  • Objects/unicodeobject.c
  • Python/ceval.c
  • Python/context.c
  • Python/hamt.c

@vstinner
Copy link
Member Author

vstinner commented Nov 1, 2018

This PR changes 33 C files add the pycore_object.h include: (...)

I wrote a simpler PR: PR #10276 includes pycore_object.h from Python.h.

@vstinner
Copy link
Member Author

I merged PR #10640 instead.

@vstinner vstinner closed this Nov 21, 2018
@vstinner vstinner deleted the object_track branch November 21, 2018 21:28
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