]> granicus.if.org Git - python/commitdiff
#4077: No need to append \n when calling Py_FatalError
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sat, 17 Jan 2009 20:18:59 +0000 (20:18 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sat, 17 Jan 2009 20:18:59 +0000 (20:18 +0000)
+ fix a declaration to make it match the one in pythonrun.h

Modules/_ctypes/libffi_msvc/ffi.c
Objects/exceptions.c
Python/ast.c
Python/compile.c

index e3e2344aa6e1dd103121531bbe903e39b06257cf..279b66b473bb7eafe793cab7db7ac17e82670ba9 100644 (file)
@@ -34,7 +34,7 @@
 /* ffi_prep_args is called by the assembly routine once stack space
    has been allocated for the function's arguments */
 
-extern void Py_FatalError(char *msg);
+extern void Py_FatalError(const char *msg);
 
 /*@-exportheader@*/
 void ffi_prep_args(char *stack, extended_cif *ecif)
index eeebb5cb2d34ff285a9069d75aa5537da0bd1b89..99cfb2b15d00188300b4b514183566523bbc7c26 100644 (file)
@@ -2127,7 +2127,7 @@ _PyExc_Init(void)
 
     PyExc_MemoryErrorInst = BaseException_new(&_PyExc_MemoryError, NULL, NULL);
     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);
     if (!PyExc_RecursionErrorInst)
index 9e8df8644bd14374dcaf6a85fc27fa03270d919a..5f369b6626807c4ec6a01ac69f8fa87f9e3d7f50 100644 (file)
@@ -197,7 +197,7 @@ num_stmts(const node *n)
         default: {
             char buf[128];
 
-            sprintf(buf, "Non-statement found: %d %d\n",
+            sprintf(buf, "Non-statement found: %d %d",
                     TYPE(n), NCH(n));
             Py_FatalError(buf);
         }
index 8f0fd8d0433fe0e0a0994f69cf574cc618a90412..44ced73c958f7df85a156b40ee7232850c7faf0f 100644 (file)
@@ -1254,7 +1254,7 @@ get_ref_type(struct compiler *c, PyObject *name)
            char buf[350];
            PyOS_snprintf(buf, sizeof(buf),
                          "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(c->u->u_name), 
                          PyObject_REPR(c->u->u_ste->ste_id),