GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — bpo-40170: PyObject_NEW() becomes an alias to PyObject_New() by vstinner · Pull Request #19379 · python/cpython Conversation
|
|
Once this PR is merged, I plan to write following PR to remove _PyObject_SIZE() and the example using it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, Victor
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Previously, PyObject_NEW() macro already called PyObject_Init() function. It now calls _PyObject_New() which calls the inlined flavor PyObject_INIT(). I don't expect any impact on performance. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The PyObject_NEW() macro becomes an alias to the PyObject_New() macro, and the PyObject_NEW_VAR() macro becomes an alias to the PyObject_NewVar() macro, to hide implementation details. They no longer access directly the PyTypeObject.tp_basicsize member. Move _PyObject_SIZE() and _PyObject_VAR_SIZE() macros to the CPython-specific C API (Include/cpython/). Replace PyObject_NEW() with PyObject_New() and replace PyObject_NEW_VAR() with PyObject_NewVar().
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.