httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@hyperreal.org
Subject cvs commit: apache-2.0/mpm/src/main http_config.c
Date Sun, 15 Aug 1999 00:03:54 GMT
ben         99/08/14 17:03:53

  Modified:    mpm/src/main http_config.c
  Log:
  Remove code that is now dead as a result of hooks.
  
  Revision  Changes    Path
  1.21      +0 -104    apache-2.0/mpm/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- http_config.c	1999/08/15 00:01:17	1.20
  +++ http_config.c	1999/08/15 00:03:53	1.21
  @@ -241,109 +241,6 @@
       return create_empty_config(p);
   }
   
  -#ifdef EXPLAIN
  -
  -struct {
  -    int offset;
  -    char *method;
  -} aMethods[] =
  -
  -{
  -#define m(meth)	{ XtOffsetOf(module,meth),#meth }
  -    { -1, "?" },
  -#undef m
  -};
  -
  -char *ShowMethod(module *modp, int offset)
  -{
  -    int n;
  -    static char buf[200];
  -
  -    for (n = 0; aMethods[n].offset >= 0; ++n)
  -	if (aMethods[n].offset == offset)
  -	    break;
  -    ap_snprintf(buf, sizeof(buf), "%s:%s", modp->name, aMethods[n].method);
  -    return buf;
  -}
  -#else
  -#define ShowMethod(modp,offset)
  -#endif
  -
  -/****************************************************************
  - *
  - * Dispatch through the modules to find handlers for various phases
  - * of request handling.  These are invoked by http_request.c to actually
  - * do the dirty work of slogging through the module structures.
  - */
  -
  -/*
  - * Optimized run_method routines.  The observation here is that many modules
  - * have NULL for most of the methods.  So we build optimized lists of
  - * everything.  If you think about it, this is really just like a sparse array
  - * implementation to avoid scanning the zero entries.
  - */
  -static const int method_offsets[] =
  -{
  -};
  -#define NMETHODS	(sizeof (method_offsets)/sizeof (method_offsets[0]))
  -
  -static struct {
  -} offsets_into_method_ptrs;
  -
  -/*
  - * This is just one big array of method_ptrs.  It's constructed such that,
  - * for example, method_ptrs[ offsets_into_method_ptrs.logger ] is the first
  - * logger function.  You go one-by-one from there until you hit a NULL.
  - * This structure was designed to hopefully maximize cache-coolness.
  - */
  -static handler_func *method_ptrs;
  -
  -/* routine to reconstruct all these shortcuts... called after every
  - * add_module.
  - * XXX: this breaks if modules dink with their methods pointers
  - */
  -static void build_method_shortcuts(void)
  -{
  -    module *modp;
  -    int how_many_ptrs;
  -    int i;
  -    int next_ptr;
  -    handler_func fp;
  -
  -    if (method_ptrs) {
  -	/* free up any previous set of method_ptrs */
  -	free(method_ptrs);
  -    }
  -
  -    /* first we count how many functions we have */
  -    how_many_ptrs = 0;
  -    for (modp = top_module; modp; modp = modp->next) {
  -	for (i = 0; i < NMETHODS; ++i) {
  -	    if (*(handler_func *) (method_offsets[i] + (char *) modp)) {
  -		++how_many_ptrs;
  -	    }
  -	}
  -    }
  -    method_ptrs = malloc((how_many_ptrs + NMETHODS) * sizeof(handler_func));
  -    if (method_ptrs == NULL) {
  -	fprintf(stderr, "Ouch!  Out of memory in build_method_shortcuts()!\n");
  -    }
  -    next_ptr = 0;
  -    for (i = 0; i < NMETHODS; ++i) {
  -	/* XXX: This is an itsy bit presumptuous about the alignment
  -	 * constraints on offsets_into_method_ptrs.  I can't remember if
  -	 * ANSI says this has to be true... -djg */
  -	((int *) &offsets_into_method_ptrs)[i] = next_ptr;
  -	for (modp = top_module; modp; modp = modp->next) {
  -	    fp = *(handler_func *) (method_offsets[i] + (char *) modp);
  -	    if (fp) {
  -		method_ptrs[next_ptr++] = fp;
  -	    }
  -	}
  -	method_ptrs[next_ptr++] = NULL;
  -    }
  -}
  -
   /*
    * For speed/efficiency we generate a compact list of all the handlers
    * and wildcard handlers.  This means we won't have to scan the entire
  @@ -1410,7 +1307,6 @@
   void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s)
   {
       ap_run_post_config(pconf,plog,ptemp,s); 
  -    build_method_shortcuts();
       init_handlers(pconf);
   }
   
  
  
  

Mime
View raw message