diff options
| author | Patrick Steinhardt <ps@pks.im> | 2019-06-16 11:03:08 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2019-08-01 11:55:48 +0200 |
| commit | c8e63812c5f2402bab4f74f68d46843d7d94123c (patch) | |
| tree | ed304f9ea8c557e053bf95de7dab5d9d6b15d836 /src/errors.h | |
| parent | e8f6341105c7221e1358a5f6fda23e57c17eadc5 (diff) | |
| download | libgit2-c8e63812c5f2402bab4f74f68d46843d7d94123c.tar.gz | |
errors: introduce `git_error_vset` function
Right now, we only provide a `git_error_set` that has a variadic
function signature. It's impossible to drive this function in a
C89-compliant way from other functions that have a variadic
signature, though, like for example `git_parse_error`.
Implement a new `git_error_vset` function that gets a `va_list`
as parameter, fixing the above problem.
Diffstat (limited to 'src/errors.h')
| -rw-r--r-- | src/errors.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/errors.h b/src/errors.h index f2af1e37d..86f06f9c7 100644 --- a/src/errors.h +++ b/src/errors.h @@ -14,8 +14,8 @@ /* * Set the error message for this thread, formatting as needed. */ - -void git_error_set(int error_class, const char *string, ...) GIT_FORMAT_PRINTF(2, 3); +void git_error_set(int error_class, const char *fmt, ...) GIT_FORMAT_PRINTF(2, 3); +void git_error_vset(int error_class, const char *fmt, va_list ap); /** * Set the error message for a regex failure, using the internal regex |
