summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-09-18 06:54:26 (GMT)
committerGitHub <noreply@github.com>2018-09-18 06:54:26 (GMT)
commit7bdf28265aa371b39f82dfc6562635801aff15a5 (patch)
tree594df8e94f169b57113ace706e148ddffa5b61a2 /Python
parentb042cf10c6084d14279c55a7e0d2d7595ff4e694 (diff)
downloadcpython-7bdf28265aa371b39f82dfc6562635801aff15a5.zip
cpython-7bdf28265aa371b39f82dfc6562635801aff15a5.tar.gz
cpython-7bdf28265aa371b39f82dfc6562635801aff15a5.tar.bz2
bpo-32455: Add jump parameter to dis.stack_effect(). (GH-6610)
Add C API function PyCompile_OpcodeStackEffectWithJump().
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index ebd73fb..707da79 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1117,6 +1117,12 @@ stack_effect(int opcode, int oparg, int jump)
}
int
+PyCompile_OpcodeStackEffectWithJump(int opcode, int oparg, int jump)
+{
+ return stack_effect(opcode, oparg, jump);
+}
+
+int
PyCompile_OpcodeStackEffect(int opcode, int oparg)
{
return stack_effect(opcode, oparg, -1);