httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject [PATCH] get/set_module_config updated
Date Sat, 11 Apr 1998 20:50:49 GMT
get/set_module_config are trivial enough to be better off inline.  Worth
1.5% performance boost.  Updated for renaming.

Dean

Index: include/http_config.h
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/include/http_config.h,v
retrieving revision 1.79
diff -u -r1.79 http_config.h
--- http_config.h	1998/04/11 12:00:19	1.79
+++ http_config.h	1998/04/11 19:58:16
@@ -281,6 +281,11 @@
 API_EXPORT(void *) ap_get_module_config(void *conf_vector, module *m);
 API_EXPORT(void) ap_set_module_config(void *conf_vector, module *m, void *val);
 
+#define ap_get_module_config(v,m)	\
+    (((void **)(v))[(m)->module_index])
+#define ap_set_module_config(v,m,val)	\
+    ((((void **)(v))[(m)->module_index]) = (val))
+
 /* Generic command handling function... */
 
 API_EXPORT_NONSTD(const char *) ap_set_string_slot(cmd_parms *, char *, char *);
Index: main/http_config.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_config.c,v
retrieving revision 1.113
diff -u -r1.113 http_config.c
--- http_config.c	1998/04/11 12:00:28	1.113
+++ http_config.c	1998/04/11 19:58:19
@@ -115,17 +115,21 @@
  * overridden).
  */
 
+#ifndef ap_get_module_config
 API_EXPORT(void *) ap_get_module_config(void *conf_vector, module *m)
 {
     void **confv = (void **) conf_vector;
     return confv[m->module_index];
 }
+#endif
 
+#ifndef ap_set_module_config
 API_EXPORT(void) ap_set_module_config(void *conf_vector, module *m, void *val)
 {
     void **confv = (void **) conf_vector;
     confv[m->module_index] = val;
 }
+#endif
 
 static void *create_empty_config(pool *p)
 {



Mime
View raw message