MINOR: istbuf: add b_fromist() to make a buffer from an ist
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Oct 2019 08:38:10 +0000 (10:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Oct 2019 08:40:47 +0000 (10:40 +0200)
commit9e46496d45ff06317ae8f4f785e6117e5b786f6f
tree0235312c2320b7e1d5c7d039d824b7e562c026a8
parent5e4c8e2a67b8db5fe293c871b00bbb33ec72fc67
MINOR: istbuf: add b_fromist() to make a buffer from an ist

A lot of our chunk-based functions are able to work on a buffer pointer
but not on an ist. Instead of duplicating all of them to also take an
ist as a source, let's have a macro to make a temporary dummy buffer
from an ist. This will only result in structure field manipulations
that the compiler will quickly figure to eliminate them with inline
functions, and in other cases it will just use 4 words in the stack
before calling a function, instead of performing intermediary
conversions.
include/common/istbuf.h