diff options
author | joshaber <joshaber@gmail.com> | 2014-07-15 17:27:58 -0700 |
---|---|---|
committer | joshaber <joshaber@gmail.com> | 2014-07-15 17:38:39 -0700 |
commit | df4cba0f2860f35ddea03e09d40ec27b9717db70 (patch) | |
tree | 4cd6316a6f4a400e59359cdd549658962f6ac333 /src/buf_text.h | |
parent | ad082501a76da1e007dd9c47e91e0f975526e531 (diff) | |
download | libgit2-expose-buffer-binary-detection.tar.gz |
Export git_buf_text_is_binary and git_buf_text_contains_nul.expose-buffer-binary-detection
So that users don’t need to implement binary detection themselves.
Diffstat (limited to 'src/buf_text.h')
-rw-r--r-- | src/buf_text.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/buf_text.h b/src/buf_text.h index e753a0244..3415ac00f 100644 --- a/src/buf_text.h +++ b/src/buf_text.h @@ -7,6 +7,7 @@ #ifndef INCLUDE_buf_text_h__ #define INCLUDE_buf_text_h__ +#include "git2/buf_text.h" #include "buffer.h" typedef enum { @@ -78,22 +79,6 @@ extern int git_buf_text_lf_to_crlf(git_buf *tgt, const git_buf *src); extern int git_buf_text_common_prefix(git_buf *buf, const git_strarray *strs); /** - * Check quickly if buffer looks like it contains binary data - * - * @param buf Buffer to check - * @return true if buffer looks like non-text data - */ -extern bool git_buf_text_is_binary(const git_buf *buf); - -/** - * Check quickly if buffer contains a NUL byte - * - * @param buf Buffer to check - * @return true if buffer contains a NUL byte - */ -extern bool git_buf_text_contains_nul(const git_buf *buf); - -/** * Check if a buffer begins with a UTF BOM * * @param bom Set to the type of BOM detected or GIT_BOM_NONE |