mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-107674: Lazy load line number to improve performance of tracing (GH-118127)
This commit is contained in:
parent
c7e7bfc4ca
commit
375c94c75d
4 changed files with 61 additions and 19 deletions
|
@ -174,6 +174,7 @@ call_trace_func(_PyLegacyEventHandler *self, PyObject *arg)
|
|||
|
||||
Py_INCREF(frame);
|
||||
int err = tstate->c_tracefunc(tstate->c_traceobj, frame, self->event, arg);
|
||||
frame->f_lineno = 0;
|
||||
Py_DECREF(frame);
|
||||
if (err) {
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue