From 6c92c339539ec87dc12783e9c8f1688a4a370c03 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 30 Dec 2021 09:46:02 -0700 Subject: Convert wrap_here to use integer parameter I think it only really makes sense to call wrap_here with an argument consisting solely of spaces. Given this, it seemed better to me that the argument be an int, rather than a string. This patch is the result. Much of it was written by a script. --- gdb/python/py-framefilter.c | 6 +++--- gdb/python/py-prettyprint.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/python') diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index 7870374..708fcc5 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -501,7 +501,7 @@ enumerate_args (PyObject *iter, if (arg.entry_kind != print_entry_values_only) { out->text (", "); - out->wrap_hint (" "); + out->wrap_hint (4); } py_print_single_arg (out, NULL, &entryarg, NULL, &opts, @@ -705,7 +705,7 @@ py_print_args (PyObject *filter, ui_out_emit_list list_emitter (out, "args"); - out->wrap_hint (" "); + out->wrap_hint (3); annotate_frame_args (); out->text (" ("); @@ -984,7 +984,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags, if (filename == NULL) return EXT_LANG_BT_ERROR; - out->wrap_hint (" "); + out->wrap_hint (3); out->text (" at "); annotate_frame_source_file (); out->field_string ("file", filename.get (), diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index df4857f..59c311c 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -474,7 +474,7 @@ print_children (PyObject *printer, const char *hint, print_spaces_filtered (2 + 2 * recurse, stream); } else - wrap_here (n_spaces (2 + 2 *recurse)); + wrap_here (2 + 2 *recurse); } if (is_map && i % 2 == 0) -- cgit v1.1