mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +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
|
@ -1186,7 +1186,8 @@ static PyObject *
|
|||
decode_utf8(char **sPtr, char *end, char* encoding)
|
||||
{
|
||||
#ifndef Py_USING_UNICODE
|
||||
abort();
|
||||
Py_FatalError("decode_utf8 should not be called in this build.");
|
||||
return NULL;
|
||||
#else
|
||||
PyObject *u, *v;
|
||||
char *s, *t;
|
||||
|
@ -1319,7 +1320,7 @@ parsestr(struct compiling *com, char *s)
|
|||
#ifndef Py_USING_UNICODE
|
||||
/* This should not happen - we never see any other
|
||||
encoding. */
|
||||
abort();
|
||||
Py_FatalError("cannot deal with encodings in this build.");
|
||||
#else
|
||||
PyObject* u = PyUnicode_DecodeUTF8(s, len, NULL);
|
||||
if (u == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue