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 mod_perl.c modperl_perl.c modperl_perl.h
Date Tue, 09 Oct 2001 00:13:01 GMT
dougm       01/10/08 17:13:00

  Modified:    src/modules/perl mod_perl.c modperl_perl.c modperl_perl.h
  Log:
  *CORE::GLOBAL::exit = \&ModPerl::Util::exit
  
  Revision  Changes    Path
  1.88      +2 -0      modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- mod_perl.c	2001/10/07 19:04:20	1.87
  +++ mod_perl.c	2001/10/09 00:13:00	1.88
  @@ -39,6 +39,8 @@
   
       modperl_env_default_populate(aTHX);
   
  +    modperl_perl_core_global_init(aTHX);
  +
       for (i=0; MP_xs_loaders[i]; i++) {
           char *name = Perl_form(aTHX_ MP_xs_loader_name, MP_xs_loaders[i]);
           newCONSTSUB(PL_defstash, name, newSViv(1));
  
  
  
  1.5       +26 -0     modperl-2.0/src/modules/perl/modperl_perl.c
  
  Index: modperl_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_perl.c	2001/09/16 17:28:43	1.4
  +++ modperl_perl.c	2001/10/09 00:13:00	1.5
  @@ -4,6 +4,32 @@
    * others (larger tweaks) are in their own modules, e.g. modperl_env.c
    */
   
  +typedef struct {
  +    const char *name;
  +    const char *sub_name;
  +    const char *core_name;
  +} modperl_perl_core_global_t;
  +
  +#define MP_PERL_CORE_GLOBAL_ENT(name) \
  +{ name, "ModPerl::Util::" name, "CORE::GLOBAL::" name }
  +
  +static modperl_perl_core_global_t MP_perl_core_global_entries[] = {
  +    MP_PERL_CORE_GLOBAL_ENT("exit"),
  +    { NULL },
  +};
  +
  +void modperl_perl_core_global_init(pTHX)
  +{
  +    modperl_perl_core_global_t *cglobals = MP_perl_core_global_entries;
  +
  +    while (cglobals->name) {
  +        GV *gv = gv_fetchpv(cglobals->core_name, TRUE, SVt_PVCV);
  +        GvCV(gv) = get_cv(cglobals->sub_name, TRUE);
  +        GvIMPORTED_CV_on(gv);
  +        cglobals++;
  +    }
  +}
  +
   void modperl_perl_ids_get(modperl_perl_ids_t *ids)
   {
       ids->pid  = (I32)getpid();
  
  
  
  1.5       +2 -0      modperl-2.0/src/modules/perl/modperl_perl.h
  
  Index: modperl_perl.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_perl.h	2001/09/16 17:28:43	1.4
  +++ modperl_perl.h	2001/10/09 00:13:00	1.5
  @@ -7,6 +7,8 @@
       Gid_t gid, egid;
   } modperl_perl_ids_t;
   
  +void modperl_perl_core_global_init(pTHX);
  +
   void modperl_perl_ids_get(modperl_perl_ids_t *ids);
   
   void modperl_perl_init_ids(pTHX_ modperl_perl_ids_t *ids);
  
  
  

Mime
View raw message