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: Convert PyObject_IS_GC() macro to a function by shihai1991 · Pull Request #19464 · python/cpython Conversation
|
|
@shihai1991 Could you rebase the PR to pick the latest changes? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Got it, done ;) |
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.
Hummmm, I think we still need a macro version for internal use for performance reasons. @vstinner was that your original intent?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Right, please add a static inline function _PyObject_IS_GC() in pycore_object.h and modify gcmodule.c to use it (replace PyObject_IS_GC with _PyObject_IS_GC). PyObject_IS_GC() function body should just call _PyObject_IS_GC(). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for making the requested changes! @pablogsal: please review the changes made to this pull request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| if (PyType_IS_GC(Py_TYPE(obj))) { | ||
| return (Py_TYPE(obj)->tp_is_gc == NULL || Py_TYPE(obj)->tp_is_gc(obj)); | ||
| } | ||
| return 0; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| if (PyType_IS_GC(Py_TYPE(obj))) { | |
| return (Py_TYPE(obj)->tp_is_gc == NULL || Py_TYPE(obj)->tp_is_gc(obj)); | |
| } | |
| return 0; | |
| return (PyType_IS_GC(Py_TYPE(obj)) | |
| && (Py_TYPE(obj)->tp_is_gc == NULL | |
| || Py_TYPE(obj)->tp_is_gc(obj))); |
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.
this code style looks more simple?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-Authored-By: Victor Stinner <[email protected]>
Co-Authored-By: Victor Stinner <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @shihai1991! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thanks, folks. I learned much in this PR(especially in docs(what is user really need). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.