mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
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.
This commit is contained in:
parent
824de25fe2
commit
1ae940a587
15 changed files with 1871 additions and 1089 deletions
|
@ -336,7 +336,7 @@ com_addbyte(c, byte)
|
|||
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 @@ optimize(c)
|
|||
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 @@ optimize(c)
|
|||
}
|
||||
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 @@ optimize(c)
|
|||
}
|
||||
|
||||
end:
|
||||
err_setval(error_type, error_value);
|
||||
err_restore(error_type, error_value, error_traceback);
|
||||
err:
|
||||
DECREF(locals);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue