diff options
| author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2023-06-02 14:10:45 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-02 14:10:45 (GMT) |
| commit | 44bb03f856c30f709bb983f9830eafe914a742aa (patch) | |
| tree | 59221bf329af04954f5a7669a87c8c82a9add670 /Python/opcode_metadata.h | |
| parent | 41de54378d54f7ffc38f07db4219e80f48c4249e (diff) | |
| download | cpython-44bb03f856c30f709bb983f9830eafe914a742aa.zip cpython-44bb03f856c30f709bb983f9830eafe914a742aa.tar.gz cpython-44bb03f856c30f709bb983f9830eafe914a742aa.tar.bz2 | |
gh-105214: Use named constants for MAKE_FUNCTION oparg (#105215)
Diffstat (limited to 'Python/opcode_metadata.h')
| -rw-r--r-- | Python/opcode_metadata.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/opcode_metadata.h b/Python/opcode_metadata.h index 69a0cc0..8c0ba7d 100644 --- a/Python/opcode_metadata.h +++ b/Python/opcode_metadata.h @@ -362,7 +362,7 @@ _PyOpcode_num_popped(int opcode, int oparg, bool jump) { case CALL_FUNCTION_EX: return ((oparg & 1) ? 1 : 0) + 3; case MAKE_FUNCTION: - return ((oparg & 0x01) ? 1 : 0) + ((oparg & 0x02) ? 1 : 0) + ((oparg & 0x04) ? 1 : 0) + ((oparg & 0x08) ? 1 : 0) + 1; + return ((oparg & MAKE_FUNCTION_DEFAULTS) ? 1 : 0) + ((oparg & MAKE_FUNCTION_KWDEFAULTS) ? 1 : 0) + ((oparg & MAKE_FUNCTION_ANNOTATIONS) ? 1 : 0) + ((oparg & MAKE_FUNCTION_CLOSURE) ? 1 : 0) + 1; case RETURN_GENERATOR: return 0; case BUILD_SLICE: |
