Repository navigation
Conversation
Documentation build overview
441 files changed ·
|
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
You should now open an issue in https://github.com/capi-workgroup/decisions/issues/ to ask the C API Working Group to validate the API.
| PyDictKeysObject *keys = old->ma_keys; | ||
| PyDictValues *values = old->ma_values; | ||
|
|
||
| // Clear the old dict keys and values, but do not decref them: |
There was a problem hiding this comment.
By the way, the existing similar (but private) _PyList_AsTupleAndClear() has a similar design: first make the list empty, and then create a tuple from the list items.
|
C API Working Group issue: capi-workgroup/decisions#109. |
|
This PR is stale because it has been open for 90 days with no activity. |
The C API Working Group accepted the API! @sobolevn: Can you address reviews and solve the merge conflicts? If you're unavailable, I might be able to continue the work on this change if you prefer. |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
| } | ||
| uintptr_t w = (uintptr_t)entry->value; | ||
| assert(!(w & (W_ENTRY_ACTIVE | W_ENTRY_TIED))); | ||
| assert((w >> W_ENTRY_SHIFT) - first < (size_t)count); |
There was a problem hiding this comment.
There is a compiler warning unused variable ‘w’ [-Wunused-variable] when Python is built without assertions. Replace w with (uintptr_t)entry->value, or add something like (void)w;, to make the warning quiet.
There was a problem hiding this comment.
Thanks! I had a look at the issue. It needs to be backported to 3.14 and 3.15, so I create a new PR for this: #161188
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I just have a few minor suggestions.
Co-authored-by: Victor Stinner <vstinner@python.org>
PyDict_AsFrozenDictAndClearC-API #153410