diff Python/compile.c @ 2052:d7e91437f0a2 legacy-trunk

Lots of changes, most minor (fatal() instead of abort(), use of err_fetch/err_restore and so on). But... NOTE: import.c has been rewritten and all the DL stuff is now in the new file importdl.c.
author Guido van Rossum <guido@python.org>
date Mon, 02 Jan 1995 19:04:15 +0000
parents ed5d0ad5ea2f
children d0d0a69b5ca3
line wrap: on
line diff
--- a/Python/compile.c	Mon Jan 02 18:38:42 1995 +0000
+++ b/Python/compile.c	Mon Jan 02 19:04:15 1995 +0000
@@ -336,7 +336,7 @@
 	if (byte < 0 || byte > 255) {
 		/*
 		fprintf(stderr, "XXX compiling bad byte: %d\n", byte);
-		abort();
+		fatal("com_addbyte: byte out of range");
 		*/
 		err_setstr(SystemError, "com_addbyte: byte out of range");
 		c->c_errors++;
@@ -2379,7 +2379,7 @@
 	int oparg;
 	object *name;
 	int fast_reserved;
-	object *error_type, *error_value;
+	object *error_type, *error_value, *error_traceback;
 	
 #define NEXTOP()	(*next_instr++)
 #define NEXTARG()	(next_instr += 2, (next_instr[-1]<<8) + next_instr[-2])
@@ -2393,7 +2393,7 @@
 	}
 	nlocals = 0;
 
-	err_get(&error_type, &error_value);
+	err_fetch(&error_type, &error_value, &error_traceback);
 	
 	next_instr = (unsigned char *) getstringvalue(c->c_code);
 	for (;;) {
@@ -2493,7 +2493,7 @@
 	}
 
  end:
-	err_setval(error_type, error_value);
+	err_restore(error_type, error_value, error_traceback);
  err:
 	DECREF(locals);
 }