diff options
| author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2023-05-21 23:20:19 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-21 23:20:19 (GMT) |
| commit | cd9748409aa877d6d9905730bf68f25cf7a6a723 (patch) | |
| tree | 71c3424f290ac53b812cbcec7e0bc4a3491ab9df /Python | |
| parent | 64d1b44a5459605af3e8572d4febfde021315633 (diff) | |
| download | cpython-cd9748409aa877d6d9905730bf68f25cf7a6a723.zip cpython-cd9748409aa877d6d9905730bf68f25cf7a6a723.tar.gz cpython-cd9748409aa877d6d9905730bf68f25cf7a6a723.tar.bz2 | |
gh-104686: Fix tracing for decorated classes (#104708)
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/compile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index cfe8224..e4dc972 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2486,6 +2486,10 @@ compiler_class_body(struct compiler *c, stmt_ty s, int firstlineno) } /* 2. load the 'build_class' function */ + + // these instructions should be attributed to the class line, + // not a decorator line + loc = LOC(s); ADDOP(c, loc, PUSH_NULL); ADDOP(c, loc, LOAD_BUILD_CLASS); |
