perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_perl_global.c
Date Sat, 13 Oct 2001 19:05:16 GMT
dougm       01/10/13 12:05:16

  Modified:    src/modules/perl modperl_perl_global.c
  Log:
  use consistent style to iterate over MP_modglobal_keys
  
  Revision  Changes    Path
  1.12      +5 -4      modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- modperl_perl_global.c	2001/10/13 19:02:03	1.11
  +++ modperl_perl_global.c	2001/10/13 19:05:16	1.12
  @@ -38,12 +38,13 @@
   
   modperl_modglobal_key_t *modperl_modglobal_lookup(pTHX_ const char *name)
   {
  -    int i;
  +    modperl_modglobal_key_t *gkey = MP_modglobal_keys;
   
  -    for (i=0; MP_modglobal_keys[i].name; i++) {
  -        if (strEQ(MP_modglobal_keys[i].name, name)) {
  -            return &MP_modglobal_keys[i];
  +    while (gkey->name) {
  +        if (strEQ(gkey->name, name)) {
  +            return gkey;
           }
  +        gkey++;
       }
   
       return NULL;
  
  
  

Mime
View raw message