FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-40077: Convert _jsonmodule to use PyType_FromSpec. by corona10 · Pull Request #19177 · python/cpython · GitHub

/ cpython Public

bpo-40077: Convert _jsonmodule to use PyType_FromSpec. - #19177

Merged
vstinner merged 6 commits into
python:masterfrom
corona10:bpo-40077-json
Mar 27, 2020
Merged

bpo-40077: Convert _jsonmodule to use PyType_FromSpec.#19177
vstinner merged 6 commits into
python:masterfrom
corona10:bpo-40077-json

Conversation

corona10 commented Mar 26, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Comment thread Modules/_json.c Outdated
Comment thread Modules/_json.c Outdated
Comment thread Modules/_json.c
Comment thread Modules/_json.c Outdated
Comment thread Modules/_json.c Outdated
Comment thread Modules/_json.c Outdated
Comment thread Modules/_json.c Outdated
Comment thread Modules/_json.c Outdated
corona10 requested a review from vstinner March 26, 2020 19:23
Comment thread Modules/_json.c
encoder_clear(self);
Py_TYPE(self)->tp_free(self);
encoder_clear((PyEncoderObject *)self);
tp->tp_free(self);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Suggested change
tp->tp_free(self);
Py_TYPE(self)->tp_free(self);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@vstinner
Py_DECREF(tp);is needed if not test is leaked.
This is why I declared tp ;)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
test_json leaked [114, 114, 114] references, sum=342
test_json failed in 35.6 sec

Comment thread Modules/_json.c Outdated
Comment thread Modules/_json.c Outdated
Comment thread Modules/_json.c
Comment thread Modules/_json.c Outdated
corona10 requested a review from vstinner March 27, 2020 03:16

Copy link
Copy Markdown
Member Author

@vstinner
Thanks for the review. :)
I 've applied all of your comment except #19177 (comment) :)

Please take a look

vstinner merged commit 33f15a1 into python:master Mar 27, 2020

Copy link
Copy Markdown
Member

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.

vstinner commented Apr 1, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL