From 400c5e5c8307a2ebe44ef1f203f5a15669f20347 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 6 Sep 2012 22:44:55 -0400 Subject: use restrict everywhere it's required by c99 and/or posix 2008 to deal with the fact that the public headers may be used with pre-c99 compilers, __restrict is used in place of restrict, and defined appropriately for any supported compiler. we also avoid the form [restrict] since older versions of gcc rejected it due to a bug in the original c99 standard, and instead use the form *restrict. --- src/regex/regexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/regex/regexec.c') diff --git a/src/regex/regexec.c b/src/regex/regexec.c index 8107aae7..855cef57 100644 --- a/src/regex/regexec.c +++ b/src/regex/regexec.c @@ -977,8 +977,8 @@ tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags, */ int -regexec(const regex_t *preg, const char *string, - size_t nmatch, regmatch_t pmatch[], int eflags) +regexec(const regex_t *restrict preg, const char *restrict string, + size_t nmatch, regmatch_t pmatch[restrict], int eflags) { tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD; reg_errcode_t status; -- cgit v1.2.1