istream_clear()
#
Resets both the reading and writing pointers of the gbuffer_t *
associated with the given istream_h
. This effectively clears the buffer, making it ready for new data.
Prototype
PUBLIC void istream_clear(
istream_h istream
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The handle to the istream whose buffer pointers need to be reset. |
Return Value
This function does not return any value.
Notes
It is equivalent to calling
istream_reset_rd()
andistream_reset_wr()
sequentially.If the
istream
or its associatedgbuffer_t *
isNULL
, the function logs an error and does nothing.
Example Usage You can use this function to completely reset the state of an istream buffer, for instance, after processing or when starting a new operation.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples