]> granicus.if.org Git - python/commitdiff
_Py_QnewFlag and INPLACE_DIVIDE are not necessary any longer
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 17 Mar 2006 08:57:43 +0000 (08:57 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 17 Mar 2006 08:57:43 +0000 (08:57 +0000)
Include/pydebug.h
Python/ceval.c
Python/pythonrun.c

index f49a98e4c41550f852291cbca0720a486e5690be..f6c7718700f51235af3d7fbd2dfe542ba79a8b58 100644 (file)
@@ -16,10 +16,6 @@ PyAPI_DATA(int) Py_TabcheckFlag;
 PyAPI_DATA(int) Py_UnicodeFlag;
 PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
 PyAPI_DATA(int) Py_DivisionWarningFlag;
-/* _XXX Py_QnewFlag should go away in 3.0.  It's true iff -Qnew is passed,
-  on the command line, and is used in 2.2 by ceval.c to make all "/" divisions
-  true divisions (which they will be in 3.0). */
-PyAPI_DATA(int) _Py_QnewFlag;
 
 /* this is a wrapper around getenv() that pays attention to
    Py_IgnoreEnvironmentFlag.  It should be used for getting variables like
index 1a3561016c3732e15c40826d93f7ec6b2ff2d302..6f767812c2ae8456940bfe1e678b5e0f9d18193e 100644 (file)
@@ -1262,19 +1262,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throw)
                        if (x != NULL) continue;
                        break;
 
-               case INPLACE_DIVIDE:
-                       if (!_Py_QnewFlag) {
-                               w = POP();
-                               v = TOP();
-                               x = PyNumber_InPlaceDivide(v, w);
-                               Py_DECREF(v);
-                               Py_DECREF(w);
-                               SET_TOP(x);
-                               if (x != NULL) continue;
-                               break;
-                       }
-                       /* -Qnew is in effect:  fall through to
-                          INPLACE_TRUE_DIVIDE */
                case INPLACE_TRUE_DIVIDE:
                        w = POP();
                        v = TOP();
index d04d111a4447b3f0e4fac74ccfafc20117e29d77..2c5400d575187a6cb6df2df48315e488fdee40bc 100644 (file)
@@ -71,10 +71,6 @@ int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
 int Py_FrozenFlag; /* Needed by getpath.c */
 int Py_UnicodeFlag = 0; /* Needed by compile.c */
 int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
-/* _XXX Py_QnewFlag should go away in 2.3.  It's true iff -Qnew is passed,
-  on the command line, and is used in 2.2 by ceval.c to make all "/" divisions
-  true divisions (which they will be in 2.3). */
-int _Py_QnewFlag = 0;
 
 /* Reference to 'warnings' module, to avoid importing it
    on the fly when the import lock may be held.  See 683658/771097