diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-07-26 21:12:00 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-07-28 09:31:00 +0200 |
commit | f85fc367e01eb0f5918263b1fcdfc8b7d16065c1 (patch) | |
tree | 3c78c3f0d4720b186a56f79c55cd3f31dc530fe5 /src/global.h | |
parent | 2dfd5eae33e079bc92a15ccfd561901ea7b69e45 (diff) | |
download | libgit2-cmn/error-buffer.tar.gz |
error: store the error messages in a reusable buffercmn/error-buffer
Instead of allocating a brand new buffer for each error string we want
to store, we can use a per-thread buffer to store the error string and
re-use the underlying storage. We already use the buffer to format the
string, so this mostly makes that more direct.
Diffstat (limited to 'src/global.h')
-rw-r--r-- | src/global.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/global.h b/src/global.h index fdad6ba89..37e909ac6 100644 --- a/src/global.h +++ b/src/global.h @@ -14,6 +14,7 @@ typedef struct { git_error *last_error; git_error error_t; + git_buf error_buf; char oid_fmt[GIT_OID_HEXSZ+1]; } git_global_st; |