Add add_internal_function overload
authorTom Tromey <tom@tromey.com>
Fri, 15 Nov 2019 23:49:17 +0000 (16:49 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 26 Nov 2019 21:20:29 +0000 (14:20 -0700)
commit1a6d41c6433a0980f302c480b1d1db71234b49e4
treed751d01c179f3b3d40ca503d3a73a11056177536
parent8318f3c337cf46ee6309b4a7f06f3934fc94b4bd
Add add_internal_function overload

add_internal_function sets a command destroyer that frees the doc
string.  However, many callers do not pass in an allocated doc string.

This adds a new overload to clearly differentiate the two cases,
fixing the latent bug.

gdb/ChangeLog
2019-11-26  Tom Tromey  <tom@tromey.com>

* value.h (add_internal_function): Add new overload.  Move
documentation from value.h.
* value.c (do_add_internal_function): New function.
(add_internal_function): Use it.  Add new overload.
(function_destroyer): Don't free doc.
* python/py-function.c (fnpy_init): Update.

Change-Id: I3f6df925bc6b3e1bccbad9eeebc487b908bb5a2a
gdb/ChangeLog
gdb/python/py-function.c
gdb/value.c
gdb/value.h
This page took 0.025483 seconds and 4 git commands to generate.