aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-file.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-12-12 22:12:12 +0100
committerJan Kratochvil <jan.kratochvil@redhat.com>2014-12-12 22:12:12 +0100
commitde571fc5fbd89d21436119ca2cd9dce1375bdcb3 (patch)
tree49f49c8013617b93c78f879040f470741c130d7a /gdb/ui-file.h
parent6dddd6a5747532ef6e9703432c51680011df4e8d (diff)
downloadgdb-de571fc5fbd89d21436119ca2cd9dce1375bdcb3.zip
gdb-de571fc5fbd89d21436119ca2cd9dce1375bdcb3.tar.gz
gdb-de571fc5fbd89d21436119ca2cd9dce1375bdcb3.tar.bz2
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 <tromey@redhat.com> * 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.
Diffstat (limited to 'gdb/ui-file.h')
-rw-r--r--gdb/ui-file.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ui-file.h b/gdb/ui-file.h
index 50c1333..29ce5e0 100644
--- a/gdb/ui-file.h
+++ b/gdb/ui-file.h
@@ -98,6 +98,12 @@ extern int ui_file_isatty (struct ui_file *);
extern void ui_file_write (struct ui_file *file, const char *buf,
long length_buf);
+/* A wrapper for ui_file_write that is suitable for use by
+ ui_file_put. */
+
+extern void ui_file_write_for_put (void *data, const char *buffer,
+ long length_buffer);
+
extern void ui_file_write_async_safe (struct ui_file *file, const char *buf,
long length_buf);