Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OSTREAM_DEF macro is utility macro for creating function table for output stream with function names derived from stream type name. i.e. OSTREAM_DEF(mem) would create function table like this: const struct out_stream_vft mem_vft = { .write = mem_write, .flush = mem_flush, .pump_from = mem_pump_from, } along with prototypes: static int mem_write(struct out_stream *, const uint8_t *, uint32_t); static int mem_flush(struct out_stream *); static int mem_pump_from(struct out_stream *, struct in_stream *, uint32_t); last function was late addition and is optional This change removes requirement to define pump_from function from OSTREAM_DEF User still can create function table with pump_from funtion without using macro if pumping is required.
- Loading branch information