diff Python/traceback.c @ 291:06774a94abb5 legacy-trunk

Don't use printobject() to print a string (filename). Print ';' instead of ',' between file and line for MPW.
author Guido van Rossum <guido@python.org>
date Mon, 24 Jun 1991 22:25:27 +0000
parents 85bd7dac13f3
children 800cf4086fb3
line wrap: on
line diff
--- a/Python/traceback.c	Mon Jun 24 22:23:45 1991 +0000
+++ b/Python/traceback.c	Mon Jun 24 22:25:27 1991 +0000
@@ -188,13 +188,16 @@
 	while (tb != NULL) {
 		if (intrcheck())
 			break;
-		fprintf(fp, "  File \"");
-		if (printobject(tb->tb_frame->f_code->co_filename,
-				fp, PRINT_RAW) != 0) {
-			err_clear();
-			break;
-		}
-		fprintf(fp, "\", line %d\n", tb->tb_lineno);
+		fprintf(fp, "  File \"%s\"",
+			getstringvalue(tb->tb_frame->f_code->co_filename));
+#ifdef applec /* MPW */
+		/* This is needed by MPW's File and Line commands */
+		fprintf(fp, "; ");
+#else
+		/* This is needed by Emacs' compile command */
+		fprintf(fp, ", ");
+#endif
+		fprintf(fp, "line %d\n", tb->tb_lineno);
 		tb_displayline(fp,
 		     getstringvalue(tb->tb_frame->f_code->co_filename),
 							tb->tb_lineno);