rstream: Implement the rstream_set_defer function

This function will be used to temporarily change the `defer` flag on rstream
instances.
This commit is contained in:
Thiago de Arruda
2014-06-17 10:02:00 -03:00
parent 1843f0c2c6
commit 05fd154ede

View File

@@ -211,6 +211,15 @@ size_t rstream_available(RStream *rstream)
return rstream->wpos - rstream->rpos;
}
/// Sets the `defer` flag for a a RStream instance
///
/// @param rstream The RStream instance
/// @param defer The new value for the flag
void rstream_set_defer(RStream *rstream, bool defer)
{
rstream->defer = defer;
}
/// Runs the read callback associated with the rstream
///
/// @param event Object containing data necessary to invoke the callback