summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-04-16 08:39:12 (GMT)
committerGuido van Rossum <guido@python.org>1991-04-16 08:39:12 (GMT)
commit0a697f686ff69ad4f9c64f4618b347a96413d431 (patch)
treef88a8d86cbe8428bea907acf4304c508eeb6e6eb /Python
parent569fce79010a4567af30b5e2523102f9e6983f98 (diff)
downloadcpython-0a697f686ff69ad4f9c64f4618b347a96413d431.zip
cpython-0a697f686ff69ad4f9c64f4618b347a96413d431.tar.gz
cpython-0a697f686ff69ad4f9c64f4618b347a96413d431.tar.bz2
BUGFIX! Instructions are unsigned bytes.
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 9567190..59cdc0c 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1803,13 +1803,13 @@ static void
optimizer(co)
codeobject *co;
{
- char *next_instr, *cur_instr;
+ unsigned char *next_instr, *cur_instr;
object *locals;
int opcode;
int oparg;
object *name;
int star_used;
-
+
#define NEXTOP() (*next_instr++)
#define NEXTARG() (next_instr += 2, (next_instr[-1]<<8) + next_instr[-2])
#define GETITEM(v, i) (getlistitem((v), (i)))
@@ -1821,7 +1821,7 @@ optimizer(co)
return; /* For now, this is OK */
}
- next_instr = GETSTRINGVALUE(co->co_code);
+ next_instr = (unsigned char *) GETSTRINGVALUE(co->co_code);
for (;;) {
opcode = NEXTOP();
if (opcode == STOP_CODE)
@@ -1838,7 +1838,7 @@ optimizer(co)
}
star_used = (dictlookup(locals, "*") != NULL);
- next_instr = GETSTRINGVALUE(co->co_code);
+ next_instr = (unsigned char *) GETSTRINGVALUE(co->co_code);
for (;;) {
cur_instr = next_instr;
opcode = NEXTOP();