[PATCHv2 2/2] Add optional full_window argument to TuiWindow.write

Tom Tromey tom@tromey.com
Mon May 24 14:17:26 GMT 2021


>>>>> "Hannes" == Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> writes:

Hannes> 2021-05-21  Hannes Domani  <ssbssa@yahoo.de>

Hannes> 	* python/py-tui.c (tui_py_window::output): Add full_window
Hannes> 	argument.
Hannes> 	(gdbpy_tui_write): Parse "full_window" argument.

Hi.  Thanks for the patch.

Hannes> -  if (!PyArg_ParseTuple (args, "s", &text))
Hannes> +  if (!PyArg_ParseTuple (args, "s|i", &text, &full_window))
Hannes>      return nullptr;

I was surprised to find out that "i" handles boolean values.

The patch looks good to me, though.  If we really want full truthy
behavior here, we can always change this to "O".  I tend to think this
wouldn't be super useful, though.

thanks,
Tom


More information about the Gdb-patches mailing list