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_util.c modperl_util.h
Date Sun, 07 Oct 2001 20:24:22 GMT
dougm       01/10/07 13:24:22

  Modified:    src/modules/perl modperl_util.c modperl_util.h
  Log:
  add modperl_perl_call_list() function
  
  Revision  Changes    Path
  1.24      +23 -0     modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- modperl_util.c	2001/10/07 20:22:02	1.23
  +++ modperl_util.c	2001/10/07 20:24:21	1.24
  @@ -399,6 +399,29 @@
       }
   }
   
  +void modperl_perl_call_list(pTHX_ AV *subs, const char *name)
  +{
  +    I32 i, oldscope = PL_scopestack_ix;
  +    SV **ary = AvARRAY(subs);
  +    
  +    for (i=0; i<=AvFILLp(subs); i++) {
  +	CV *cv = (CV*)ary[i];
  +	SV *atsv = ERRSV;
  +
  +	PUSHMARK(PL_stack_sp);
  +	call_sv((SV*)cv, G_EVAL|G_DISCARD);
  +
  +	if (SvCUR(atsv)) {
  +            Perl_sv_catpvf(aTHX_ atsv, "%s failed--call queue aborted",
  +                           name);
  +	    while (PL_scopestack_ix > oldscope) {
  +		LEAVE;
  +            }
  +            Perl_croak(aTHX_ "%s", SvPVX(atsv));
  +	}
  +    }
  +}
  +
   MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
                                    char *key, SV *sv_val)
   {
  
  
  
  1.23      +2 -0      modperl-2.0/src/modules/perl/modperl_util.h
  
  Index: modperl_util.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- modperl_util.h	2001/10/07 20:22:02	1.22
  +++ modperl_util.h	2001/10/07 20:24:21	1.23
  @@ -68,6 +68,8 @@
   
   MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src);
   
  +void modperl_perl_call_list(pTHX_ AV *subs, const char *name);
  +
   MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
                                    char *key, SV *sv_val);
       
  
  
  

Mime
View raw message