mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Use Py_FatalError instead of abort.
This commit is contained in:
parent
2f7f8c4a64
commit
2863c10a86
2 changed files with 6 additions and 4 deletions
|
@ -326,7 +326,8 @@ fp_readl(char *s, int size, struct tok_state *tok)
|
|||
{
|
||||
#ifndef Py_USING_UNICODE
|
||||
/* In a non-Unicode built, this should never be called. */
|
||||
abort();
|
||||
Py_FatalError("fp_readl should not be called in this build.");
|
||||
return NULL;
|
||||
#else
|
||||
PyObject* utf8;
|
||||
PyObject* buf = tok->decoding_buffer;
|
||||
|
@ -403,7 +404,7 @@ static void fp_ungetc(int c, struct tok_state *tok) {
|
|||
static char *
|
||||
decoding_fgets(char *s, int size, struct tok_state *tok)
|
||||
{
|
||||
char *line;
|
||||
char *line = NULL;
|
||||
int warn = 0, badchar = 0;
|
||||
for (;;) {
|
||||
if (tok->decoding_state < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue