10000 Issue #24436: Added const qualifiers for char* arguments of _PyTraceb… · python/cpython@73c95f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 73c95f1

Browse files
Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.
Patch by Michael Ensslin.
1 parent 753a1df commit 73c95f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Include/traceback.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PyAPI_FUNC(int) PyTraceBack_Here(struct _frame *);
2424
PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *);
2525
#ifndef Py_LIMITED_API
2626
PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int);
27-
PyAPI_FUNC(void) _PyTraceback_Add(char *, char *, int);
27+
PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
2828
#endif
2929

3030
/* Reveal traceback type so we can typecheck traceback objects */

Python/traceback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ PyTraceBack_Here(PyFrameObject *frame)
143143
}
144144

145145
/* Insert a frame into the traceback for (funcname, filename, lineno). */
146-
void _PyTraceback_Add(char *funcname, char *filename, int lineno)
146+
void _PyTraceback_Add(const char *funcname, const char *filename, int lineno)
147147
{
148148
PyObject *globals = NULL;
149149
PyCodeObject *code = NULL;

0 commit comments

Comments
 (0)
0