istream_reset_wr()
#
Resets the writing pointer of the gbuffer_t *
associated with the given istream_h
. This effectively clears any written data in the buffer, making it empty for future writes.
Prototype
PUBLIC int istream_reset_wr(
istream_h istream
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The handle to the istream whose writing pointer needs to be reset. |
Return Value
Returns 0
if the operation was successful.
Returns -1
if the istream
or its associated gbuffer_t *
is NULL
.
Notes
This function logs an error if the
istream
or its buffer is invalid.It does not affect the reading pointer or any other attributes of the
istream
.
Example Usage
This function can be used when you need to clear the writing pointer and start writing new data into the istream_h
without affecting its reading pointer.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples