Use unique_xmalloc_ptr in watchpoint

This changes struct watchpoint to use unique_xmalloc_ptr in a couple
of places, removing a bit of manual memory management.
This commit is contained in:
Tom Tromey 2021-10-02 16:49:54 -06:00
parent 5c1146d2de
commit a4c50be3d6
4 changed files with 18 additions and 25 deletions

View file

@ -433,7 +433,7 @@ bppy_get_expression (PyObject *self, void *closure)
wp = (struct watchpoint *) obj->bp;
str = wp->exp_string;
str = wp->exp_string.get ();
if (! str)
str = "";