mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
afdafade1a
The reftable blocksource provides a generic interface to read blocks via different sources, e.g. from disk or from memory. One of the block sources is the malloc block source, which can in theory read data from memory. We nowadays also have a strbuf block source though, which provides essentially the same functionality with better ergonomics. Adapt the only remaining user of the malloc block source in our tests to use the strbuf block source, instead, and remove the now-unused malloc block source. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 lines
452 B
C
21 lines
452 B
C
/*
|
|
Copyright 2020 Google LLC
|
|
|
|
Use of this source code is governed by a BSD-style
|
|
license that can be found in the LICENSE file or at
|
|
https://developers.google.com/open-source/licenses/bsd
|
|
*/
|
|
|
|
#ifndef BLOCKSOURCE_H
|
|
#define BLOCKSOURCE_H
|
|
|
|
#include "system.h"
|
|
|
|
struct reftable_block_source;
|
|
|
|
/* Create an in-memory block source for reading reftables */
|
|
void block_source_from_strbuf(struct reftable_block_source *bs,
|
|
struct strbuf *buf);
|
|
|
|
#endif
|