perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_module.c
Date Fri, 13 Dec 2002 04:40:32 GMT
stas        2002/12/12 20:40:32

  Modified:    src/modules/perl modperl_module.c
  Log:
  make sure that the vars declaration comes before any code, apparently gcc
  3.2's default is to allow the new ansi C extension to allow declarations
  anywhere in the code.
  Submitted by:	"Philippe M. Chiasson" <gozer@cpan.org>
  Reviewed by:	stas
  
  Revision  Changes    Path
  1.10      +27 -19    modperl-2.0/src/modules/perl/modperl_module.c
  
  Index: modperl_module.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_module.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_module.c	12 Dec 2002 10:12:41 -0000	1.9
  +++ modperl_module.c	13 Dec 2002 04:40:31 -0000	1.10
  @@ -152,6 +152,15 @@
           *tmp,
           *base = (modperl_module_cfg_t *)basev,
           *add  = (modperl_module_cfg_t *)addv;
  +    server_rec *s;
  +    int is_startup;
  +    PTR_TBL_t *table;
  +    SV *mrg_obj = Nullsv, *base_obj, *add_obj;
  +
  +#ifdef USE_ITHREADS
  +    modperl_interp_t *interp;
  +    dTHX;
  +#endif
       
       /* if the module is loaded in vhost, base==NULL */
       tmp = (base && base->server) ? base : add;
  @@ -161,18 +170,17 @@
           return basev;
       }
       
  -    server_rec *s = tmp->server;
  -    int is_startup = (p == s->process->pconf);
  +    s = tmp->server;
  +    is_startup = (p == s->process->pconf);
   
   #ifdef USE_ITHREADS
  -    modperl_interp_t *interp = modperl_interp_pool_select(p, s);
  -    dTHXa(interp->perl);
  +    interp = modperl_interp_pool_select(p, s);
  +    aTHX = interp->perl;
   #endif
   
  -    PTR_TBL_t *table = modperl_module_config_table_get(aTHX_ TRUE);
  -    SV *mrg_obj = Nullsv,
  -        *base_obj = modperl_svptr_table_fetch(aTHX_ table, base),
  -        *add_obj  = modperl_svptr_table_fetch(aTHX_ table, add);
  +    table = modperl_module_config_table_get(aTHX_ TRUE);
  +    base_obj = modperl_svptr_table_fetch(aTHX_ table, base);
  +    add_obj  = modperl_svptr_table_fetch(aTHX_ table, add);
   
       if (!base_obj || (base_obj == add_obj)) {
           return addv;
  @@ -335,7 +343,17 @@
       modperl_module_info_t *minfo = MP_MODULE_INFO(info->modp);
       modperl_module_cfg_t *srv_cfg;
   
  -   if (s->is_virtual) {
  +#ifdef USE_ITHREADS
  +    modperl_interp_t *interp = modperl_interp_pool_select(p, s);
  +    dTHXa(interp->perl);
  +#endif
  +
  +    int count;
  +    PTR_TBL_t *table = modperl_module_config_table_get(aTHX_ TRUE);
  +    SV *obj = Nullsv;
  +    dSP;
  +    
  +    if (s->is_virtual) {
           MP_dSCFG(s);
   
           /* if the Perl module is loaded in the base server and a vhost
  @@ -371,16 +389,6 @@
           
       }
       
  -#ifdef USE_ITHREADS
  -    modperl_interp_t *interp = modperl_interp_pool_select(p, s);
  -    dTHXa(interp->perl);
  -#endif
  -
  -    int count;
  -    PTR_TBL_t *table = modperl_module_config_table_get(aTHX_ TRUE);
  -    SV *obj = Nullsv;
  -    dSP;
  -
       errmsg = modperl_module_config_get_obj(aTHX_ p, table, cfg, info,
                                              minfo->dir_create,
                                              parms, &obj);
  
  
  

Mime
View raw message