summaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2017-03-23 12:51:14 +0100
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2017-03-23 12:51:14 +0100
commit1a5e158b68d0fb3b1ba3d038e87c841239572a35 (patch)
tree9afe3fe652aef3eba18a4214167d8a738eba24b1 /gdb/python/python.c
parent3f2a3564b1c3872e4a380f2484d40ce2495a4835 (diff)
Remove constness of libdir in do_start_initialization
The patch "Fix memory leak in python.c:do_start_initialization" (https://sourceware.org/ml/gdb-patches/2017-03/msg00407.html) introduced a compilation error on some platforms: ../../binutils-gdb/gdb/python/python.c: In function bool do_start_initialization(): ../../binutils-gdb/gdb/python/python.c:1556:16: error: invalid conversion from const void* to void* [-fpermissive] xfree (libdir); ^ This is fixed by removing the constness of libdir's data type. gdb/ChangeLog: * python/python.c (do_start_initialization): Remove 'const' from data type of libdir.
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r--gdb/python/python.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index d814252303..d21e023591 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1550,7 +1550,7 @@ do_start_initialization ()
/foo/bin/python
/foo/lib/pythonX.Y/...
This must be done before calling Py_Initialize. */
- const char *libdir = ldirname (python_libdir);
+ char *libdir = ldirname (python_libdir);
progname = concat (libdir, SLASH_STRING, "bin",
SLASH_STRING, "python", (char *) NULL);
xfree (libdir);