httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <>
Subject Re: [PATCH] Make apr_table_elts const
Date Sun, 11 Nov 2001 22:46:11 GMT
Brian Pane wrote:

> This patch changes the apr_table_elts macro so that it provides
> access to the internals of an apr_table_t via a const pointer
> instead of the current non-const pointer.
> My main motivation for this is to make it possible to speed up
> the table internals in the future (e.g., by adding an index
> for fast lookups) without breaking backward compatibility.
> In addition, allowing non-const access to the array is dangerous
> even with the current code base.  For example, an application
> can break assumptions in the table code by setting keys in the
> array to null.
> All the current uses of apr_table_elts in Apache 2.0 are for
> const iterators, so the only change required to the httpd code
> is the replacement of "apr_array_header_t*" declarations with
> "const apr_array_header_t*" (the patch includes the diffs for
> all the affected files).
> --Brian

(with Justin's & your isapi additional patches)

View raw message