File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1038,7 +1038,7 @@ _PyXIData_ReleaseAndRawFree(_PyXIData_t *xidata)
10381038/* convenience utilities */
10391039/*************************/
10401040
1041- static const char *
1041+ static char *
10421042_copy_string_obj_raw (PyObject * strobj , Py_ssize_t * p_size )
10431043{
10441044 Py_ssize_t size = -1 ;
@@ -1139,15 +1139,15 @@ _format_TracebackException(PyObject *tbexc)
11391139 }
11401140
11411141 Py_ssize_t size = -1 ;
1142- const char * formatted = _copy_string_obj_raw (formatted_obj , & size );
1142+ char * formatted = _copy_string_obj_raw (formatted_obj , & size );
11431143 Py_DECREF (formatted_obj );
11441144 if (formatted == NULL || size == 0 ) {
11451145 return formatted ;
11461146 }
11471147 assert (formatted [size ] == '\0' );
11481148 // Remove a trailing newline if needed.
11491149 if (formatted [size - 1 ] == '\n' ) {
1150- (( char * ) formatted ) [size - 1 ] = '\0' ;
1150+ formatted [size - 1 ] = '\0' ;
11511151 }
11521152 return formatted ;
11531153}
You can’t perform that action at this time.
0 commit comments