mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-23 18:26:47 +08:00
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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user