From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 2/5] Make two ui_out methods 'private'
Date: Fri, 12 Jun 2026 08:25:22 -0600 [thread overview]
Message-ID: <20260612-submit-zebra-style-v1-2-cfd00b5c984c@tromey.com> (raw)
In-Reply-To: <20260612-submit-zebra-style-v1-0-cfd00b5c984c@tromey.com>
This marks ui_out::table_begin and ui_out::table_end as private. They
should only be called from ui_out_emit_table.
---
gdb/ui-out.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index d59e58631e9..a7230846115 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -30,6 +30,7 @@
class ui_out_level;
class ui_out_table;
+class ui_out_emit_table;
struct ui_file;
/* the current ui_out */
@@ -173,11 +174,9 @@ class ui_out
field, ... }, ... ] }''. If NR_ROWS is negative then there is at
least one row. */
- void table_begin (int nr_cols, int nr_rows, const std::string &tblid);
void table_header (int width, ui_align align, const std::string &col_name,
const std::string &col_hdr);
void table_body ();
- void table_end ();
void begin (ui_out_type type, const char *id);
void end (ui_out_type type);
@@ -393,6 +392,12 @@ class ui_out
{ return false; }
private:
+
+ /* A table can only be started or ended by ui_out_emit_table. */
+ friend class ui_out_emit_table;
+ void table_begin (int nr_cols, int nr_rows, const std::string &tblid);
+ void table_end ();
+
/* A helper for vmessage that wraps a call to do_message. This will
update CURRENT_STYLE when needed. */
void call_do_message (ui_file_style ¤t_style,
--
2.49.0
next prev parent reply other threads:[~2026-06-12 14:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 14:25 [PATCH 0/5] Add zebra-striping to CLI tables Tom Tromey
2026-06-12 14:25 ` [PATCH 1/5] Ensure tgetent is called before tgetnum Tom Tromey
2026-06-12 14:25 ` Tom Tromey [this message]
2026-06-12 14:25 ` [PATCH 3/5] Allow "phony" ui-out tables Tom Tromey
2026-06-12 14:25 ` [PATCH 4/5] Add ui_file_style::merge Tom Tromey
2026-06-12 14:25 ` [PATCH 5/5] Add zebra-striping to CLI table display Tom Tromey
2026-06-12 15:14 ` Eli Zaretskii
2026-06-13 14:28 ` Matt Rice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260612-submit-zebra-style-v1-2-cfd00b5c984c@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox