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 modperl_perl_global.h
Date Sun, 07 Oct 2001 22:04:07 GMT
dougm       01/10/07 15:04:07

  Modified:    src/modules/perl modperl_perl_global.c modperl_perl_global.h
  Log:
  add modperl_modglobal_lookup() function to lookup a modperl_modglobal_key_t based on string
name
  
  Revision  Changes    Path
  1.7       +14 -0     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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_perl_global.c	2001/10/07 21:59:16	1.6
  +++ modperl_perl_global.c	2001/10/07 22:04:07	1.7
  @@ -17,7 +17,21 @@
   
   static modperl_modglobal_key_t MP_modglobal_keys[] = {
       MP_MODGLOBAL_ENT("END"),
  +    { NULL },
   };
  +
  +modperl_modglobal_key_t *modperl_modglobal_lookup(pTHX_ const char *name)
  +{
  +    int i;
  +
  +    for (i=0; MP_modglobal_keys[i].name; i++) {
  +        if (strEQ(MP_modglobal_keys[i].name, name)) {
  +            return &MP_modglobal_keys[i];
  +        }
  +    }
  +
  +    return NULL;
  +}
   
   static AV *modperl_perl_global_avcv_fetch(pTHX_ modperl_modglobal_key_t *gkey,
                                             const char *package, I32 packlen)
  
  
  
  1.6       +2 -0      modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- modperl_perl_global.h	2001/10/07 21:59:16	1.5
  +++ modperl_perl_global.h	2001/10/07 22:04:07	1.6
  @@ -49,6 +49,8 @@
       modperl_perl_global_svpv_t rs;
   } modperl_perl_globals_t;
   
  +modperl_modglobal_key_t *modperl_modglobal_lookup(pTHX_ const char *name);
  +
   void modperl_perl_global_request_save(pTHX_ request_rec *r);
   
   void modperl_perl_global_request_restore(pTHX_ request_rec *r);
  
  
  

Mime
View raw message