Fix a bug in the handling of the stacklevel argument in warnings.warn() where
the stack was being unwound by two levels instead of one each time.
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 3e7dda7..0e48675 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -445,10 +445,8 @@
/* Setup globals and lineno. */
PyFrameObject *f = PyThreadState_GET()->frame;
- while (--stack_level > 0 && f != NULL) {
+ while (--stack_level > 0 && f != NULL)
f = f->f_back;
- --stack_level;
- }
if (f == NULL) {
globals = PyThreadState_Get()->interp->sysdict;