You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2003/03/27 18:47:28 UTC

DO NOT REPLY [Bug 18421] New: - ap_regexec function declaration arg1 should be const

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18421>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18421

ap_regexec function declaration arg1 should be const

           Summary: ap_regexec function declaration arg1 should be const
           Product: Apache httpd-2.0
           Version: HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: daniel.lescohier@cnet.com


In httpd.h, arg1 of the ap_regexec function should be declared const.  The code
should change from:

AP_DECLARE(int)    ap_regexec(regex_t *preg, const char *string,
                              size_t nmatch, regmatch_t pmatch[], int eflags);

to:

AP_DECLARE(int)    ap_regexec(const regex_t *preg, const char *string,
                              size_t nmatch, regmatch_t pmatch[], int eflags);

When executing a regular expression, the regex_t structure is not modified by
regexec (see the regexec man page).

My compiler gives warning messages when passing "const regex_t *" to ap_regexec,
even though it's perfectly valid to use "const regex_t *" instead of "regex_t *".

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org