diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-05-05 14:33:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-05-06 12:56:10 +0900 |
commit | d4e2d15a8b028352df480e7be9f1864f59c16299 (patch) | |
tree | e8cd1e8403141fb2cc54896f59c23a413285b324 /Documentation | |
parent | streaming.c: stop passing around "object_info *" to open() (diff) | |
download | tgif-d4e2d15a8b028352df480e7be9f1864f59c16299.tar.xz |
streaming.c: move {open,close,read} from vtable to "struct git_istream"
Move the definition of the structure around the open/close/read
functions introduced in 46bf043807c (streaming: a new API to read from
the object store, 2011-05-11) to instead populate "close" and "read"
members in the "struct git_istream".
This gets us rid of an extra pointer deference, and I think makes more
sense. The "close" and "read" functions are the primary interface to
the stream itself.
Let's also populate a "open" callback in the same struct. That's now
used by open_istream() after istream_source() decides what "open"
function should be used. This isn't needed to get rid of the
"stream_vtbl" variables, but makes sense for consistency.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions