summaryrefslogtreecommitdiff
blob: fa2063410284bb72f9049ea91316b45d41a20689 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- VirtualBox-6.0.0_BETA2/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+++ VirtualBox-6.0.0_BETA2/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
@@ -55,7 +55,7 @@
 #endif
 #include "nspr.h" // PR_fprintf
 
-static char *PyTraceback_AsString(PyObject *exc_tb);
+static const char *PyTraceback_AsString(PyObject *exc_tb);
 
 // The internal helper that actually moves the
 // formatted string to the target!
@@ -358,7 +358,7 @@
 */
 #define TRACEBACK_FETCH_ERROR(what) {errMsg = what; goto done;}
 
-char *PyTraceback_AsString(PyObject *exc_tb)
+const char *PyTraceback_AsString(PyObject *exc_tb)
 {
 	const char *errMsg = NULL; /* holds a local error message */
 	char *result = NULL; /* a valid, allocated result. */
@@ -438,7 +438,7 @@
 
 	{ // a temp scope so I can use temp locals.
 #if PY_MAJOR_VERSION <= 2
-	char *tempResult = PyString_AsString(obResult);
+	const char *tempResult = PyString_AsString(obResult);
 #else
     /* PyUnicode_AsUTF8() is const char * as of Python 3.7, char * earlier. */
 	const char *tempResult = (const char *)PyUnicode_AsUTF8(obResult);