@@ -119,6 +119,10 @@ CTracer_dealloc(CTracer *self)
119119}
120120
121121#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+
122126static const char *
123127indent (int n )
124128{
@@ -132,9 +136,6 @@ indent(int n)
132136}
133137
134138static 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 ;
138139
139140static void
140141CTracer_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
787788 #endif
788789
789790 #if WHAT_LOG
791+ const char * w = "XXX " ;
790792 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 ];
794794 }
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 );
795798 #endif
796799
797800 #if TRACE_LOG
0 commit comments