mirror of https://github.com/python/cpython
SF bug #496549 -Qnew and in-place division "/=".
eval_frame(): Under -Qnew, INPLACE_DIVIDE wasn't getting handed off to INPLACE_TRUE_DIVIDE (like BINARY_DIVIDE was getting handed off to BINARY_TRUE_DIVIDE). Bugfix candidate.
This commit is contained in:
parent
2826fade49
commit
54b11918be
|
@ -1091,6 +1091,7 @@ eval_frame(PyFrameObject *f)
|
|||
break;
|
||||
|
||||
case INPLACE_DIVIDE:
|
||||
if (!_Py_QnewFlag) {
|
||||
w = POP();
|
||||
v = POP();
|
||||
x = PyNumber_InPlaceDivide(v, w);
|
||||
|
@ -1099,6 +1100,18 @@ eval_frame(PyFrameObject *f)
|
|||
PUSH(x);
|
||||
if (x != NULL) continue;
|
||||
break;
|
||||
}
|
||||
/* -Qnew is in effect: fall through to
|
||||
INPLACE_TRUE_DIVIDE */
|
||||
case INPLACE_TRUE_DIVIDE:
|
||||
w = POP();
|
||||
v = POP();
|
||||
x = PyNumber_InPlaceTrueDivide(v, w);
|
||||
Py_DECREF(v);
|
||||
Py_DECREF(w);
|
||||
PUSH(x);
|
||||
if (x != NULL) continue;
|
||||
break;
|
||||
|
||||
case INPLACE_FLOOR_DIVIDE:
|
||||
w = POP();
|
||||
|
@ -1110,16 +1123,6 @@ eval_frame(PyFrameObject *f)
|
|||
if (x != NULL) continue;
|
||||
break;
|
||||
|
||||
case INPLACE_TRUE_DIVIDE:
|
||||
w = POP();
|
||||
v = POP();
|
||||
x = PyNumber_InPlaceTrueDivide(v, w);
|
||||
Py_DECREF(v);
|
||||
Py_DECREF(w);
|
||||
PUSH(x);
|
||||
if (x != NULL) continue;
|
||||
break;
|
||||
|
||||
case INPLACE_MODULO:
|
||||
w = POP();
|
||||
v = POP();
|
||||
|
|
Loading…
Reference in New Issue