Skip to content

Commit 712ce45

Browse files
committed
_Py_QnewFlag and INPLACE_DIVIDE are not necessary any longer
1 parent bd2835c commit 712ce45

3 files changed

Lines changed: 0 additions & 21 deletions

File tree

Include/pydebug.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ PyAPI_DATA(int) Py_TabcheckFlag;
1616
PyAPI_DATA(int) Py_UnicodeFlag;
1717
PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
1818
PyAPI_DATA(int) Py_DivisionWarningFlag;
19-
/* _XXX Py_QnewFlag should go away in 3.0. It's true iff -Qnew is passed,
20-
on the command line, and is used in 2.2 by ceval.c to make all "/" divisions
21-
true divisions (which they will be in 3.0). */
22-
PyAPI_DATA(int) _Py_QnewFlag;
2319

2420
/* this is a wrapper around getenv() that pays attention to
2521
Py_IgnoreEnvironmentFlag. It should be used for getting variables like

Python/ceval.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,19 +1262,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throw)
12621262
if (x != NULL) continue;
12631263
break;
12641264

1265-
case INPLACE_DIVIDE:
1266-
if (!_Py_QnewFlag) {
1267-
w = POP();
1268-
v = TOP();
1269-
x = PyNumber_InPlaceDivide(v, w);
1270-
Py_DECREF(v);
1271-
Py_DECREF(w);
1272-
SET_TOP(x);
1273-
if (x != NULL) continue;
1274-
break;
1275-
}
1276-
/* -Qnew is in effect: fall through to
1277-
INPLACE_TRUE_DIVIDE */
12781265
case INPLACE_TRUE_DIVIDE:
12791266
w = POP();
12801267
v = TOP();

Python/pythonrun.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
7171
int Py_FrozenFlag; /* Needed by getpath.c */
7272
int Py_UnicodeFlag = 0; /* Needed by compile.c */
7373
int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
74-
/* _XXX Py_QnewFlag should go away in 2.3. It's true iff -Qnew is passed,
75-
on the command line, and is used in 2.2 by ceval.c to make all "/" divisions
76-
true divisions (which they will be in 2.3). */
77-
int _Py_QnewFlag = 0;
7874

7975
/* Reference to 'warnings' module, to avoid importing it
8076
on the fly when the import lock may be held. See 683658/771097

0 commit comments

Comments
 (0)