This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, shihai1991
Priority: normal Keywords: patch

Created on 2019-10-28 14:56 by shihai1991, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 16963 closed shihai1991, 2019-10-28 14:59
Messages (3)
msg355547 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2019-10-28 14:56
1) param is unpredictable;
2) the compiler_free() use Py_XDECREF(c->c_filename) in PyAST_CompileObject();
msg355552 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-10-28 15:46
The filename argument must be non-NULL. The code that uses c_filename requires this.

Py_XDECREF in compiler_free() could be replaced with Py_DECREF. But this is too tiny change which does not have significant effect.

Actually both Py_INCREF and Py_XDECREF could be removed.
msg355563 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2019-10-28 16:42
Got it, thanks, Serhiy.
History
Date User Action Args
2022-04-11 14:59:22adminsetgithub: 82798
2019-10-28 16:42:22shihai1991setmessages: + msg355563
2019-10-28 15:59:23serhiy.storchakasetstatus: open -> closed
resolution: not a bug
stage: patch review -> resolved
2019-10-28 15:46:29serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg355552
2019-10-28 14:59:12shihai1991setkeywords: + patch
stage: patch review
pull_requests: + pull_request16491
2019-10-28 14:56:23shihai1991create