]> Savannah Git Hosting - gnulib.git/commitdiff
regex-quote: Use 'restrict'.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:33:37 +0000 (12:33 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:33:37 +0000 (12:33 +0100)
* lib/regex-quote.h (regex_quote_copy): Use 'restrict'.
* modules/regex-quote (configure.ac): Require AC_C_RESTRICT.

ChangeLog
lib/regex-quote.h
modules/regex-quote

index 525ecdb78e755c9819f9e57ebf278962757d2e08..7f4db6a3b78899e776ee8de1e379fc590ed880c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       regex-quote: Use 'restrict'.
+       * lib/regex-quote.h (regex_quote_copy): Use 'restrict'.
+       * modules/regex-quote (configure.ac): Require AC_C_RESTRICT.
+
        system-quote: Use 'restrict'.
        * lib/system-quote.h (system_quote_copy): Use 'restrict'.
        * modules/system-quote (configure.ac): Require AC_C_RESTRICT.
index 185f9fea251127004269543b1d2e22da70973a09..b6b299f52f5746b8dbc131302670bc241f85b123 100644 (file)
@@ -77,7 +77,7 @@ extern size_t
 /* Copies the quoted string to p and returns the incremented p.
    There must be room for regex_quote_length (string, spec) + 1 bytes at p.  */
 extern char *
-       regex_quote_copy (char *p,
+       regex_quote_copy (char *restrict p,
                          const char *string, const struct regex_quote_spec *spec);
 
 /* Returns the freshly allocated quoted string.  */
index 9b67ca20c4386e4592dddcb8ecdea5e02d7c8ada..4623339c3ddcd6066cc2cff52ec3aa2c6f031beb 100644 (file)
@@ -11,6 +11,7 @@ xalloc
 mbuiter
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 
 Makefile.am:
 lib_SOURCES += regex-quote.c