1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Introduce ap_(get|set)_core_module_config() functions/macros and use them

everywhere.

We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2011-06-06 21:26:56 +00:00
parent 8b98cff952
commit c9fd2623da
43 changed files with 217 additions and 155 deletions

View File

@@ -223,7 +223,7 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
/* XXXXX: THIS IS AN EVIL HACK */
/* There should really be a (documented) public API for this ! */
clientsock = ap_get_module_config(r->connection->conn_config, &core_module);
clientsock = ap_get_core_module_config(r->connection->conn_config);
rv = send_socket(r->pool, sock, clientsock);
if (rv != APR_SUCCESS) {
@@ -245,7 +245,7 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
"proxy: FD: failed to create dummy socket");
return HTTP_INTERNAL_SERVER_ERROR;
}
ap_set_module_config(r->connection->conn_config, &core_module, dummy);
ap_set_core_module_config(r->connection->conn_config, dummy);
}