Commit f7c0125f47ce23d52685648e076e663bc3a8939e

Edward Thomson 2015-02-18T09:28:07

filter streams: base -> parent

diff --git a/src/filter.c b/src/filter.c
index af5902e..08aa14b 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -624,7 +624,7 @@ static int filter_list_out_buffer_from_raw(
 }
 
 struct buf_stream {
-	git_writestream base;
+	git_writestream parent;
 	git_buf *target;
 	bool complete;
 };
@@ -660,9 +660,9 @@ static void buf_stream_init(struct buf_stream *writer, git_buf *target)
 {
 	memset(writer, 0, sizeof(struct buf_stream));
 
-	writer->base.write = buf_stream_write;
-	writer->base.close = buf_stream_close;
-	writer->base.free = buf_stream_free;
+	writer->parent.write = buf_stream_write;
+	writer->parent.close = buf_stream_close;
+	writer->parent.free = buf_stream_free;
 	writer->target = target;
 
 	git_buf_clear(target);
@@ -744,7 +744,7 @@ int git_filter_list_apply_to_blob(
 }
 
 struct proxy_stream {
-	git_writestream base;
+	git_writestream parent;
 	git_filter *filter;
 	const git_filter_source *source;
 	void **payload;
@@ -815,9 +815,9 @@ static int proxy_stream_init(
 	struct proxy_stream *proxy_stream = git__calloc(1, sizeof(struct proxy_stream));
 	GITERR_CHECK_ALLOC(proxy_stream);
 
-	proxy_stream->base.write = proxy_stream_write;
-	proxy_stream->base.close = proxy_stream_close;
-	proxy_stream->base.free = proxy_stream_free;
+	proxy_stream->parent.write = proxy_stream_write;
+	proxy_stream->parent.close = proxy_stream_close;
+	proxy_stream->parent.free = proxy_stream_free;
 	proxy_stream->filter = filter;
 	proxy_stream->payload = payload;
 	proxy_stream->source = source;
diff --git a/tests/filter/stream.c b/tests/filter/stream.c
index f7456b8..4dafce4 100644
--- a/tests/filter/stream.c
+++ b/tests/filter/stream.c
@@ -30,7 +30,7 @@ void test_filter_stream__cleanup(void)
 #define CHUNKSIZE 10240
 
 struct compress_stream {
-	git_writestream base;
+	git_writestream parent;
 	git_writestream *next;
 	git_filter_mode_t mode;
 	char current;
@@ -113,9 +113,9 @@ static int compress_filter_stream_init(
 	GIT_UNUSED(self);
 	GIT_UNUSED(payload);
 
-	stream->base.write = compress_stream_write;
-	stream->base.close = compress_stream_close;
-	stream->base.free = compress_stream_free;
+	stream->parent.write = compress_stream_write;
+	stream->parent.close = compress_stream_close;
+	stream->parent.free = compress_stream_free;
 	stream->next = next;
 	stream->mode = git_filter_source_mode(src);