From: Guido van Rossum Date: Mon, 3 Mar 1997 19:13:14 +0000 (+0000) Subject: Add global Py_OptimizeFlag. SET_LINENO is omitted again unless this is X-Git-Tag: v1.5a1~312 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e793d925c1fa43840bc2a45292843c28a497976;p=thirdparty%2FPython%2Fcpython.git Add global Py_OptimizeFlag. SET_LINENO is omitted again unless this is nonzero. --- diff --git a/Python/compile.c b/Python/compile.c index 0ee55195322a..b4377ec98a69 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -59,6 +59,8 @@ PERFORMANCE OF THIS SOFTWARE. #include #include +int Py_OptimizeFlag = 0; + #define OP_DELETE 0 #define OP_ASSIGN 1 #define OP_APPLY 2 @@ -579,12 +581,13 @@ com_addoparg(c, op, arg) int op; int arg; { - if (op == SET_LINENO) + if (op == SET_LINENO) { com_set_lineno(c, arg); - else { - com_addbyte(c, op); - com_addint(c, arg); + if (Py_OptimizeFlag) + return; } + com_addbyte(c, op); + com_addint(c, arg); } static void