summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-09-11 10:48:15 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-09-11 10:48:15 (GMT)
commitab8740058a7f76f1438dc18a2ffd918da4f8118d (patch)
treef4c763c6e8f6281255b326a17eaaae2c1b237e73 /Objects/frameobject.c
parentbdb847ae99512e0985e1a3e955c90e23d36f8804 (diff)
downloadcpython-ab8740058a7f76f1438dc18a2ffd918da4f8118d.zip
cpython-ab8740058a7f76f1438dc18a2ffd918da4f8118d.tar.gz
cpython-ab8740058a7f76f1438dc18a2ffd918da4f8118d.tar.bz2
Issue #27129: Replaced wordcode related magic constants with macros.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index b115614..62f9f34 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -189,7 +189,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
memset(blockstack, '\0', sizeof(blockstack));
memset(in_finally, '\0', sizeof(in_finally));
blockstack_top = 0;
- for (addr = 0; addr < code_len; addr += 2) {
+ for (addr = 0; addr < code_len; addr += sizeof(_Py_CODEUNIT)) {
unsigned char op = code[addr];
switch (op) {
case SETUP_LOOP:
@@ -273,7 +273,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
* can tell whether the jump goes into any blocks without coming out
* again - in that case we raise an exception below. */
delta_iblock = 0;
- for (addr = min_addr; addr < max_addr; addr += 2) {
+ for (addr = min_addr; addr < max_addr; addr += sizeof(_Py_CODEUNIT)) {
unsigned char op = code[addr];
switch (op) {
case SETUP_LOOP: