summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c46
-rw-r--r--Python/compile.c2
2 files changed, 24 insertions, 24 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index fa08fe6..07e4013 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -431,7 +431,7 @@ void
Py_SetRecursionLimit(int new_limit)
{
recursion_limit = new_limit;
- _Py_CheckRecursionLimit = recursion_limit;
+ _Py_CheckRecursionLimit = recursion_limit;
}
/* the macro Py_EnterRecursiveCall() only calls _Py_CheckRecursiveCall()
@@ -469,7 +469,7 @@ _Py_CheckRecursiveCall(char *where)
where);
return -1;
}
- _Py_CheckRecursionLimit = recursion_limit;
+ _Py_CheckRecursionLimit = recursion_limit;
return 0;
}
@@ -805,11 +805,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
Py_MakePendingCalls() above. */
if (--_Py_Ticker < 0) {
- if (*next_instr == SETUP_FINALLY) {
- /* Make the last opcode before
- a try: finally: block uninterruptable. */
- goto fast_next_opcode;
- }
+ if (*next_instr == SETUP_FINALLY) {
+ /* Make the last opcode before
+ a try: finally: block uninterruptable. */
+ goto fast_next_opcode;
+ }
_Py_Ticker = _Py_CheckInterval;
tstate->tick_counter++;
#ifdef WITH_TSC
@@ -2500,7 +2500,7 @@ fast_yield:
}
/* pop frame */
- exit_eval_frame:
+exit_eval_frame:
Py_LeaveRecursiveCall();
tstate->frame = f->f_back;
@@ -2761,9 +2761,9 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
return PyGen_New(f);
}
- retval = PyEval_EvalFrameEx(f,0);
+ retval = PyEval_EvalFrameEx(f,0);
- fail: /* Jump here from prelude on failure */
+fail: /* Jump here from prelude on failure */
/* decref'ing the frame can cause __del__ methods to get invoked,
which can call back into Python. While we're done with the
@@ -2772,7 +2772,7 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
*/
assert(tstate != NULL);
++tstate->recursion_depth;
- Py_DECREF(f);
+ Py_DECREF(f);
--tstate->recursion_depth;
return retval;
}
@@ -3186,18 +3186,18 @@ maybe_call_line_trace(Py_tracefunc func, PyObject *obj,
represents a jump backwards, call the trace function.
*/
if ((frame->f_lasti < *instr_lb || frame->f_lasti >= *instr_ub)) {
- int line;
- PyAddrPair bounds;
+ int line;
+ PyAddrPair bounds;
- line = PyCode_CheckLineNumber(frame->f_code, frame->f_lasti,
- &bounds);
- if (line >= 0) {
+ line = PyCode_CheckLineNumber(frame->f_code, frame->f_lasti,
+ &bounds);
+ if (line >= 0) {
frame->f_lineno = line;
result = call_trace(func, obj, frame,
PyTrace_LINE, Py_None);
- }
- *instr_lb = bounds.ap_lower;
- *instr_ub = bounds.ap_upper;
+ }
+ *instr_lb = bounds.ap_lower;
+ *instr_ub = bounds.ap_upper;
}
else if (frame->f_lasti <= *instr_prev) {
result = call_trace(func, obj, frame, PyTrace_LINE, Py_None);
@@ -3583,9 +3583,9 @@ update_keyword_args(PyObject *orig_kwdict, int nk, PyObject ***pp_stack,
PyObject *value = EXT_POP(*pp_stack);
PyObject *key = EXT_POP(*pp_stack);
if (PyDict_GetItem(kwdict, key) != NULL) {
- PyErr_Format(PyExc_TypeError,
- "%.200s%s got multiple values "
- "for keyword argument '%.200s'",
+ PyErr_Format(PyExc_TypeError,
+ "%.200s%s got multiple values "
+ "for keyword argument '%.200s'",
PyEval_GetFuncName(func),
PyEval_GetFuncDesc(func),
PyUnicode_AsString(key));
@@ -3763,7 +3763,7 @@ ext_do_call(PyObject *func, PyObject ***pp_stack, int flags, int na, int nk)
PCALL(PCALL_OTHER);
#endif
result = PyObject_Call(func, callargs, kwdict);
- ext_call_fail:
+ext_call_fail:
Py_XDECREF(callargs);
Py_XDECREF(kwdict);
Py_XDECREF(stararg);
diff --git a/Python/compile.c b/Python/compile.c
index e569102..d20da0a 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1428,7 +1428,7 @@ compiler_function(struct compiler *c, stmt_ty s)
st = (stmt_ty)asdl_seq_GET(s->v.FunctionDef.body, 0);
docstring = compiler_isdocstring(st);
- if (docstring)
+ if (docstring && Py_OptimizeFlag < 2)
first_const = st->v.Expr.value->v.Str.s;
if (compiler_add_o(c, c->u->u_consts, first_const) < 0) {
compiler_exit_scope(c);