summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-02-18 09:25:32 -0500
committerEdward Thomson <ethomson@microsoft.com>2015-02-18 10:24:23 -0500
commitb75f15aaf1587594cd398b192cdc40aa83ba8e23 (patch)
tree573ec7432ddfb2ba6a17b4e092c579c9c3dfa27b /include
parent8c2dfb38dbc782a6b964bfcfd43e4f46bb71526e (diff)
downloadlibgit2-b75f15aaf1587594cd398b192cdc40aa83ba8e23.tar.gz
git_writestream: from git_filter_stream
Diffstat (limited to 'include')
-rw-r--r--include/git2/filter.h6
-rw-r--r--include/git2/sys/filter.h10
-rw-r--r--include/git2/types.h10
3 files changed, 13 insertions, 13 deletions
diff --git a/include/git2/filter.h b/include/git2/filter.h
index 600356c71..c0aaf1508 100644
--- a/include/git2/filter.h
+++ b/include/git2/filter.h
@@ -140,18 +140,18 @@ GIT_EXTERN(int) git_filter_list_apply_to_blob(
GIT_EXTERN(int) git_filter_list_stream_data(
git_filter_list *filters,
git_buf *data,
- git_filter_stream *target);
+ git_writestream *target);
GIT_EXTERN(int) git_filter_list_stream_file(
git_filter_list *filters,
git_repository *repo,
const char *path,
- git_filter_stream *target);
+ git_writestream *target);
GIT_EXTERN(int) git_filter_list_stream_blob(
git_filter_list *filters,
git_blob *blob,
- git_filter_stream *target);
+ git_writestream *target);
/**
* Free a git_filter_list
diff --git a/include/git2/sys/filter.h b/include/git2/sys/filter.h
index cc06c54ad..9b560fa75 100644
--- a/include/git2/sys/filter.h
+++ b/include/git2/sys/filter.h
@@ -208,18 +208,12 @@ typedef int (*git_filter_apply_fn)(
const git_buf *from,
const git_filter_source *src);
-struct git_filter_stream {
- int (*write)(git_filter_stream *stream, const char *buffer, size_t len);
- int (*close)(git_filter_stream *stream);
- void (*free)(git_filter_stream *stream);
-};
-
typedef int (*git_filter_stream_fn)(
- git_filter_stream **out,
+ git_writestream **out,
git_filter *self,
void **payload,
const git_filter_source *src,
- git_filter_stream *next);
+ git_writestream *next);
/**
* Callback to clean up after filtering has been applied
diff --git a/include/git2/types.h b/include/git2/types.h
index 3ed97d189..c90ac4776 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -410,8 +410,14 @@ typedef enum {
GIT_SUBMODULE_RECURSE_ONDEMAND = 2,
} git_submodule_recurse_t;
-/** A stream to write filters. */
-typedef struct git_filter_stream git_filter_stream;
+/** A type to write in a streaming fashion, for example, for filters. */
+typedef struct git_writestream git_writestream;
+
+struct git_writestream {
+ int (*write)(git_writestream *stream, const char *buffer, size_t len);
+ int (*close)(git_writestream *stream);
+ void (*free)(git_writestream *stream);
+};
/** @} */
GIT_END_DECL