guile: Change return value of gdbscm_with_guile for const char *
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 27 Oct 2015 17:11:45 +0000 (13:11 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 27 Oct 2015 17:12:12 +0000 (13:12 -0400)
commitc5192092506e52a5f075b137a36933e42db64563
treeb77e4f0b07106b16ef1b88a3e19e4cd1a9edff0a
parent79b289e2d8083691ccb2c943d4502e1af54e81e2
guile: Change return value of gdbscm_with_guile for const char *

The documentation of gdbscm_with_guile says that it returns a statically
allocated string (IOW, a const char *).  We can reflect that in its
return value type, and get rid of C++ build errors.

Initially fixes:

/home/simark/src/binutils-gdb/gdb/guile/scm-disasm.c: In function ‘void* gdbscm_disasm_read_memory_worker(void*)’:
/home/simark/src/binutils-gdb/gdb/guile/scm-disasm.c:93:12: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
     return "seek error";

gdb/ChangeLog:

* guile/guile-internal.h (gdbscm_with_guile): Change return
types to const char *.
* guile/scm-safe-call.c (gdbscm_with_guile): Likewise.
(struct c_data) <func>: Likewise.
(struct c_data) <result>: Change type to const char *.
(scscm_eval_scheme_string): Change return type to
const char *.
(scscm_source_scheme_script): Likewise.
(gdbscm_safe_eval_string): Change type of result variable to
const char * and remove cast.
(gdbscm_safe_source_script): Likewise.
* guile/scm-disasm.c (gdbscm_disasm_read_memory_worker):
Change return type to const char *.
(gdbscm_disasm_read_memory): Change type of status to
const char *.
gdb/ChangeLog
gdb/guile/guile-internal.h
gdb/guile/scm-disasm.c
gdb/guile/scm-safe-call.c
This page took 0.02566 seconds and 4 git commands to generate.