mirror of
https://github.com/python/cpython.git
synced 2025-10-03 13:45:29 +00:00
#4077: No need to append \n when calling Py_FatalError
+ fix a declaration to make it match the one in pythonrun.h
This commit is contained in:
parent
bd55c52565
commit
59ce042766
4 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@
|
||||||
/* ffi_prep_args is called by the assembly routine once stack space
|
/* ffi_prep_args is called by the assembly routine once stack space
|
||||||
has been allocated for the function's arguments */
|
has been allocated for the function's arguments */
|
||||||
|
|
||||||
extern void Py_FatalError(char *msg);
|
extern void Py_FatalError(const char *msg);
|
||||||
|
|
||||||
/*@-exportheader@*/
|
/*@-exportheader@*/
|
||||||
void ffi_prep_args(char *stack, extended_cif *ecif)
|
void ffi_prep_args(char *stack, extended_cif *ecif)
|
||||||
|
|
|
@ -2127,7 +2127,7 @@ _PyExc_Init(void)
|
||||||
|
|
||||||
PyExc_MemoryErrorInst = BaseException_new(&_PyExc_MemoryError, NULL, NULL);
|
PyExc_MemoryErrorInst = BaseException_new(&_PyExc_MemoryError, NULL, NULL);
|
||||||
if (!PyExc_MemoryErrorInst)
|
if (!PyExc_MemoryErrorInst)
|
||||||
Py_FatalError("Cannot pre-allocate MemoryError instance\n");
|
Py_FatalError("Cannot pre-allocate MemoryError instance");
|
||||||
|
|
||||||
PyExc_RecursionErrorInst = BaseException_new(&_PyExc_RuntimeError, NULL, NULL);
|
PyExc_RecursionErrorInst = BaseException_new(&_PyExc_RuntimeError, NULL, NULL);
|
||||||
if (!PyExc_RecursionErrorInst)
|
if (!PyExc_RecursionErrorInst)
|
||||||
|
|
|
@ -197,7 +197,7 @@ num_stmts(const node *n)
|
||||||
default: {
|
default: {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
sprintf(buf, "Non-statement found: %d %d\n",
|
sprintf(buf, "Non-statement found: %d %d",
|
||||||
TYPE(n), NCH(n));
|
TYPE(n), NCH(n));
|
||||||
Py_FatalError(buf);
|
Py_FatalError(buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1254,7 +1254,7 @@ get_ref_type(struct compiler *c, PyObject *name)
|
||||||
char buf[350];
|
char buf[350];
|
||||||
PyOS_snprintf(buf, sizeof(buf),
|
PyOS_snprintf(buf, sizeof(buf),
|
||||||
"unknown scope for %.100s in %.100s(%s) in %s\n"
|
"unknown scope for %.100s in %.100s(%s) in %s\n"
|
||||||
"symbols: %s\nlocals: %s\nglobals: %s\n",
|
"symbols: %s\nlocals: %s\nglobals: %s",
|
||||||
PyString_AS_STRING(name),
|
PyString_AS_STRING(name),
|
||||||
PyString_AS_STRING(c->u->u_name),
|
PyString_AS_STRING(c->u->u_name),
|
||||||
PyObject_REPR(c->u->u_ste->ste_id),
|
PyObject_REPR(c->u->u_ste->ste_id),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue