@@ -119,6 +119,10 @@ CTracer_dealloc(CTracer *self)
119
119
}
120
120
121
121
#if TRACE_LOG
122
+ /* Set debugging constants: a file substring and line number to start logging. */
123
+ static const char * start_file = "badasync.py" ;
124
+ static int start_line = 1 ;
125
+
122
126
static const char *
123
127
indent (int n )
124
128
{
@@ -132,9 +136,6 @@ indent(int n)
132
136
}
133
137
134
138
static BOOL logging = FALSE;
135
- /* Set these constants to be a file substring and line number to start logging. */
136
- static const char * start_file = "nested.py" ;
137
- static int start_line = 1 ;
138
139
139
140
static void
140
141
CTracer_showlog (CTracer * self , int lineno , PyObject * filename , const char * msg )
@@ -787,11 +788,13 @@ CTracer_trace(CTracer *self, PyFrameObject *frame, int what, PyObject *arg_unuse
787
788
#endif
788
789
789
790
#if WHAT_LOG
791
+ const char * w = "XXX " ;
790
792
if (what <= (int )(sizeof (what_sym )/sizeof (const char * ))) {
791
- ascii = PyUnicode_AsASCIIString (MyFrame_GetCode (frame )-> co_filename );
792
- printf ("%x trace: f:%x %s @ %s %d\n" , (int )self , (int )frame , what_sym [what ], PyBytes_AS_STRING (ascii ), PyFrame_GetLineNumber (frame ));
793
- Py_DECREF (ascii );
793
+ w = what_sym [what ];
794
794
}
795
+ ascii = PyUnicode_AsASCIIString (MyFrame_GetCode (frame )-> co_filename );
796
+ printf ("%x trace: f:%x %s @ %s %d\n" , (int )self , (int )frame , what_sym [what ], PyBytes_AS_STRING (ascii ), PyFrame_GetLineNumber (frame ));
797
+ Py_DECREF (ascii );
795
798
#endif
796
799
797
800
#if TRACE_LOG
0 commit comments