diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-12 23:06:39 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-05-19 11:10:08 +0100 |
commit | 02683b20c0775dab28d72727cc97a96ec77cb20c (patch) | |
tree | af4fc1c23a5ca20b94ebdf6b0603b88fff686670 /src/errors.c | |
parent | c9f116f148c9eb64988eb36ec83d1a653dc81ee0 (diff) | |
download | libgit2-02683b20c0775dab28d72727cc97a96ec77cb20c.tar.gz |
regexec: prefix all regexec function calls with p_
Prefix all the calls to the the regexec family of functions with `p_`.
This allows us to swap out all the regular expression functions with our
own implementation. Move the declarations to `posix_regex.h` for
simpler inclusion.
Diffstat (limited to 'src/errors.c')
-rw-r--r-- | src/errors.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/errors.c b/src/errors.c index afa340936..8ef491916 100644 --- a/src/errors.c +++ b/src/errors.c @@ -105,16 +105,16 @@ void git_error_set_str(int error_class, const char *string) set_error_from_buffer(error_class); } -int git_error_set_regex(const regex_t *regex, int error_code) +int git_error_set_regex(const p_regex_t *regex, int error_code) { char error_buf[1024]; assert(error_code); - regerror(error_code, regex, error_buf, sizeof(error_buf)); + p_regerror(error_code, regex, error_buf, sizeof(error_buf)); git_error_set_str(GIT_ERROR_REGEX, error_buf); - if (error_code == REG_NOMATCH) + if (error_code == P_REG_NOMATCH) return GIT_ENOTFOUND; return GIT_EINVALIDSPEC; |