8000 Fix some comments in ceval.c and fix lltrace output (#101297) · python/cpython@498598e · GitHub
[go: up one dir, main page]

Skip to content

Commit 498598e

Browse files
authored
Fix some comments in ceval.c and fix lltrace output (#101297)
The comment at the top was rather outdated. :-) Also added a note about the dangers of dump_stack().
1 parent 1a9d8c7 commit 498598e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Python/ceval.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
/* Execute compiled code */
22

3-
/* XXX TO DO:
4-
XXX speed up searching for keywords by using a dictionary
5-
XXX document it!
6-
*/
7-
83
#define _PY_INTERPRETER
94

105
#include "Python.h"
@@ -133,6 +128,9 @@ lltrace_instruction(_PyInterpreterFrame *frame,
133128
PyObject **stack_pointer,
134129
_Py_CODEUNIT *next_instr)
135130
{
131+
/* This dump_stack() operation is risky, since the repr() of some
132+
objects enters the interpreter recursively. It is also slow.
133+
So you might want to comment it out. */
136134
dump_stack(frame, stack_pointer);
137135
int oparg = _Py_OPARG(*next_instr);
138136
int opcode = _Py_OPCODE(*next_instr);
@@ -155,7 +153,7 @@ lltrace_resume_frame(_PyInterpreterFrame *frame)
155153
fobj == NULL ||
156154
!PyFunction_Check(fobj)
157155
) {
158-
printf("\nResuming frame.");
156+
printf("\nResuming frame.\n");
159157
return;
160158
}
161159
PyFunctionObject *f = (PyFunctionObject *)fobj;

0 commit comments

Comments
 (0)
0