Uh oh!
There was an error while loading. Please reload this page.
bpo-40077: Convert _jsonmodule to use PyType_FromSpec. - #19177
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| encoder_clear(self); | ||
| Py_TYPE(self)->tp_free(self); | ||
| encoder_clear((PyEncoderObject *)self); | ||
| tp->tp_free(self); |
There was a problem hiding this comment.
The current code is just fine, no? I don't see the value of tp. It seems like it comes from a previous change that you reverted.
| tp->tp_free(self); | |
| Py_TYPE(self)->tp_free(self); |
There was a problem hiding this comment.
@vstinnerPy_DECREF(tp);is needed if not test is leaked.
This is why I declared tp ;)
There was a problem hiding this comment.
test_json leaked [114, 114, 114] references, sum=342
test_json failed in 35.6 secUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
corona10
commented
Mar 27, 2020
@vstinner Please take a look |
vstinner
commented
Mar 27, 2020
Thanks @corona10, this change was interesting. I learnt a few things :-) I merged your PR, but I completed the commit message to elaborate on changes that you wrote. |
I mentioned the removed assertions in bpo-40137 that I just created: TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented. |
https://bugs.python.org/issue40077