diff options
author | Steve Dower <steve.dower@python.org> | 2023-02-20 14:56:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 14:56:48 (GMT) |
commit | a99eb5cd9947629a6745a4ad99cb07af1c287b5d (patch) | |
tree | 2d2b82cef5aa1c514eda32eaca115e2723fd7f1c /Python/compile.c | |
parent | c00faf79438cc7f0d98af2679c695f747e4369a3 (diff) | |
download | cpython-a99eb5cd9947629a6745a4ad99cb07af1c287b5d.zip cpython-a99eb5cd9947629a6745a4ad99cb07af1c287b5d.tar.gz cpython-a99eb5cd9947629a6745a4ad99cb07af1c287b5d.tar.bz2 |
gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)
* gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h
* Make cases_generator correct on Windows
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Python/compile.c b/Python/compile.c index c3b344c..3f620be 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -274,31 +274,31 @@ write_instr(_Py_CODEUNIT *codestr, struct instr *instruction, int ilen) int caches = _PyOpcode_Caches[opcode]; switch (ilen - caches) { case 4: - codestr->opcode = EXTENDED_ARG; - codestr->oparg = (oparg >> 24) & 0xFF; + codestr->op.code = EXTENDED_ARG; + codestr->op.arg = (oparg >> 24) & 0xFF; codestr++; /* fall through */ case 3: - codestr->opcode = EXTENDED_ARG; - codestr->oparg = (oparg >> 16) & 0xFF; + codestr->op.code = EXTENDED_ARG; + codestr->op.arg = (oparg >> 16) & 0xFF; codestr++; /* fall through */ case 2: - codestr->opcode = EXTENDED_ARG; - codestr->oparg = (oparg >> 8) & 0xFF; + codestr->op.code = EXTENDED_ARG; + codestr->op.arg = (oparg >> 8) & 0xFF; codestr++; /* fall through */ case 1: - codestr->opcode = opcode; - codestr->oparg = oparg & 0xFF; + codestr->op.code = opcode; + codestr->op.arg = oparg & 0xFF; codestr++; break; default: Py_UNREACHABLE(); } while (caches--) { - codestr->opcode = CACHE; - codestr->oparg = 0; + codestr->op.code = CACHE; + codestr->op.arg = 0; codestr++; } } |