diff options
author | joshaber <joshaber@gmail.com> | 2014-07-16 13:34:25 -0700 |
---|---|---|
committer | joshaber <joshaber@gmail.com> | 2014-07-16 13:34:25 -0700 |
commit | b3af2d80d2d6393dada89c713baff9b3eba49a01 (patch) | |
tree | ee90407f88e1a54b509f6f89b46288a57a316ac5 /include | |
parent | df4cba0f2860f35ddea03e09d40ec27b9717db70 (diff) | |
download | libgit2-b3af2d80d2d6393dada89c713baff9b3eba49a01.tar.gz |
Just put it all in buffer.
Diffstat (limited to 'include')
-rw-r--r-- | include/git2.h | 1 | ||||
-rw-r--r-- | include/git2/buf_text.h | 42 | ||||
-rw-r--r-- | include/git2/buffer.h | 16 |
3 files changed, 16 insertions, 43 deletions
diff --git a/include/git2.h b/include/git2.h index 2a2ad93ff..f74976061 100644 --- a/include/git2.h +++ b/include/git2.h @@ -13,7 +13,6 @@ #include "git2/blame.h" #include "git2/branch.h" #include "git2/buffer.h" -#include "git2/buf_text.h" #include "git2/checkout.h" #include "git2/cherrypick.h" #include "git2/clone.h" diff --git a/include/git2/buf_text.h b/include/git2/buf_text.h deleted file mode 100644 index 29bfca80d..000000000 --- a/include/git2/buf_text.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) the libgit2 contributors. All rights reserved. - * - * This file is part of libgit2, distributed under the GNU GPL v2 with - * a Linking Exception. For full terms see the included COPYING file. - */ -#ifndef INCLUDE_git_buf_text_h__ -#define INCLUDE_git_buf_text_h__ - -#include "common.h" -#include "buffer.h" - -/** - * @file git2/buf_text.h - * @brief Buffer text export structure - * - * @ingroup Git - * @{ - */ -GIT_BEGIN_DECL - -/** - * Check quickly if buffer looks like it contains binary data - * - * @param buf Buffer to check - * @return 1 if buffer looks like non-text data - */ -GIT_EXTERN(int) git_buf_text_is_binary(const git_buf *buf); - -/** - * Check quickly if buffer contains a NUL byte - * - * @param buf Buffer to check - * @return 1 if buffer contains a NUL byte - */ -GIT_EXTERN(int) git_buf_text_contains_nul(const git_buf *buf); - -GIT_END_DECL - -/** @} */ - -#endif diff --git a/include/git2/buffer.h b/include/git2/buffer.h index 36a61e6c9..1c216bf3a 100644 --- a/include/git2/buffer.h +++ b/include/git2/buffer.h @@ -105,6 +105,22 @@ GIT_EXTERN(int) git_buf_grow(git_buf *buffer, size_t target_size); GIT_EXTERN(int) git_buf_set( git_buf *buffer, const void *data, size_t datalen); +/** +* Check quickly if buffer looks like it contains binary data +* +* @param buf Buffer to check +* @return 1 if buffer looks like non-text data +*/ +GIT_EXTERN(int) git_buf_is_binary(const git_buf *buf); + +/** +* Check quickly if buffer contains a NUL byte +* +* @param buf Buffer to check +* @return 1 if buffer contains a NUL byte +*/ +GIT_EXTERN(int) git_buf_contains_nul(const git_buf *buf); + GIT_END_DECL /** @} */ |