[Python-checkins] cpython (merge 3.5 -> default): Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.

serhiy.storchaka python-checkins at python.org
Sun Jun 21 15:01:22 CEST 2015


https://hg.python.org/cpython/rev/4cd00e6fa2ee
changeset:   96629:4cd00e6fa2ee
parent:      96626:2d072d07dfe2
parent:      96628:9602b8313dd5
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sun Jun 21 16:00:58 2015 +0300
summary:
  Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.
Patch by Michael Ensslin.

files:
  Include/traceback.h |  2 +-
  Python/traceback.c  |  2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Include/traceback.h b/Include/traceback.h
--- a/Include/traceback.h
+++ b/Include/traceback.h
@@ -24,7 +24,7 @@
 PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *);
 #ifndef Py_LIMITED_API
 PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int);
-PyAPI_FUNC(void) _PyTraceback_Add(char *, char *, int);
+PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
 #endif
 
 /* Reveal traceback type so we can typecheck traceback objects */
diff --git a/Python/traceback.c b/Python/traceback.c
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -143,7 +143,7 @@
 }
 
 /* Insert a frame into the traceback for (funcname, filename, lineno). */
-void _PyTraceback_Add(char *funcname, char *filename, int lineno)
+void _PyTraceback_Add(const char *funcname, const char *filename, int lineno)
 {
     PyObject *globals = NULL;
     PyCodeObject *code = NULL;

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list