mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 13:06:14 +01:00
GSeekable: improve g_seekable_[can_]truncate docs
I was not born next to a PDP-11, either, but I think this is marginally more informative! https://bugzilla.gnome.org/show_bug.cgi?id=573251
This commit is contained in:
parent
663a5cc95f
commit
41112ef00d
@ -141,7 +141,8 @@ g_seekable_seek (GSeekable *seekable,
|
|||||||
* g_seekable_can_truncate:
|
* g_seekable_can_truncate:
|
||||||
* @seekable: a #GSeekable.
|
* @seekable: a #GSeekable.
|
||||||
*
|
*
|
||||||
* Tests if the stream can be truncated.
|
* Tests if the length of the stream can be adjusted with
|
||||||
|
* g_seekable_truncate().
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
|
* Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
|
||||||
**/
|
**/
|
||||||
@ -160,12 +161,14 @@ g_seekable_can_truncate (GSeekable *seekable)
|
|||||||
/**
|
/**
|
||||||
* g_seekable_truncate:
|
* g_seekable_truncate:
|
||||||
* @seekable: a #GSeekable.
|
* @seekable: a #GSeekable.
|
||||||
* @offset: a #goffset.
|
* @offset: new length for @seekable, in bytes.
|
||||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError location to store the error occurring, or %NULL to
|
* @error: a #GError location to store the error occurring, or %NULL to
|
||||||
* ignore.
|
* ignore.
|
||||||
*
|
*
|
||||||
* Truncates a stream with a given #offset.
|
* Sets the length of the stream to @offset. If the stream was previously
|
||||||
|
* larger than @offset, the extra data is discarded. If the stream was
|
||||||
|
* previouly shorter than @offset, it is extended with NUL ('\0') bytes.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@ -173,7 +176,6 @@ g_seekable_can_truncate (GSeekable *seekable)
|
|||||||
* operation was partially finished when the operation was cancelled the
|
* operation was partially finished when the operation was cancelled the
|
||||||
* partial result will be returned, without an error.
|
* partial result will be returned, without an error.
|
||||||
*
|
*
|
||||||
* Virtual: truncate_fn
|
|
||||||
* Returns: %TRUE if successful. If an error
|
* Returns: %TRUE if successful. If an error
|
||||||
* has occurred, this function will return %FALSE and set @error
|
* has occurred, this function will return %FALSE and set @error
|
||||||
* appropriately if present.
|
* appropriately if present.
|
||||||
|
Loading…
Reference in New Issue
Block a user