From de571fc5fbd89d21436119ca2cd9dce1375bdcb3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 12 Dec 2014 22:12:12 +0100 Subject: introduce ui_file_write_for_put This introduces a small helper function, ui_file_write_for_put. It is a wrapper for ui_write that is suitable for passing directly to ui_file_put. This patch also updates one existing spot to use this new function. gdb/ChangeLog 2014-12-12 Tom Tromey * ui-file.h (ui_file_write_for_put): Declare. * ui-file.c (ui_file_write_for_put): New function. * mi/mi-out.c (do_write): Remove. (mi_out_put): Use ui_file_write_for_put. --- gdb/ui-file.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/ui-file.c') diff --git a/gdb/ui-file.c b/gdb/ui-file.c index 49607dc..e3c7ba2 100644 --- a/gdb/ui-file.c +++ b/gdb/ui-file.c @@ -223,6 +223,12 @@ ui_file_write (struct ui_file *file, } void +ui_file_write_for_put (void *data, const char *buffer, long length_buffer) +{ + ui_file_write (data, buffer, length_buffer); +} + +void ui_file_write_async_safe (struct ui_file *file, const char *buf, long length_buf) -- cgit v1.1