(original) (raw)

changeset: 84569:51eddca9dd6f user: Victor Stinner victor.stinner@gmail.com date: Thu Jul 11 23:17:33 2013 +0200 files: Parser/parsetok.c description: 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. diff -r 0877e17fa25e -r 51eddca9dd6f Parser/parsetok.c --- a/Parser/parsetok.c Thu Jul 11 23:08:39 2013 +0200 +++ b/Parser/parsetok.c Thu Jul 11 23:17:33 2013 +0200 @@ -138,7 +138,6 @@ 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; /victor.stinner@gmail.com