diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-11 21:17:33 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-11 21:17:33 (GMT) |
commit | 526daabf341a2e0e5c2624ebcf82968bd48b5019 (patch) | |
tree | 9e97049d0d00174140eba9e1c2dd1abc115cd132 /Parser/parsetok.c | |
parent | 71c8b7ec0464628633954333038af2f8174c10be (diff) | |
download | cpython-526daabf341a2e0e5c2624ebcf82968bd48b5019.zip cpython-526daabf341a2e0e5c2624ebcf82968bd48b5019.tar.gz cpython-526daabf341a2e0e5c2624ebcf82968bd48b5019.tar.bz2 |
Issue #18408: parsetok() must not write into stderr on memory allocation error
The caller gets an error code and can raise a classic Python exception.
Diffstat (limited to 'Parser/parsetok.c')
-rw-r--r-- | Parser/parsetok.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 7abc612..d61ba92 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -138,7 +138,6 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret, int started = 0; if ((ps = PyParser_New(g, start)) == NULL) { - fprintf(stderr, "no mem for new parser\n"); err_ret->error = E_NOMEM; PyTokenizer_Free(tok); return NULL; |