diff --git a/gio/gfile.c b/gio/gfile.c index 568ed3532..5b9226c76 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -7311,6 +7311,11 @@ replace_contents_open_callback (GObject *obj, * * If @make_backup is %TRUE, this function will attempt to * make a backup of @file. + * + * No copy of @content will be made, so it must stay valid until + * @callback is called. See g_file_replace_contents_bytes_async() for a #GBytes + * version that will automatically hold a reference to the contents (without + * copying) for the duration of the call. */ void g_file_replace_contents_async (GFile *file, diff --git a/gio/goutputstream.c b/gio/goutputstream.c index d54418f9c..c2e651e05 100644 --- a/gio/goutputstream.c +++ b/gio/goutputstream.c @@ -787,6 +787,11 @@ async_ready_write_callback_wrapper (GObject *source_object, * * For the synchronous, blocking version of this function, see * g_output_stream_write(). + * + * No copy of @buffer will be made, so it must stay valid until + * @callback is called. See g_output_stream_write_bytes_async() for a #GBytes + * version that will automatically hold a reference to the contents (without + * copying) for the duration of the call. **/ void g_output_stream_write_async (GOutputStream *stream,