dougm       01/10/06 16:27:35

  Modified:    src/modules/perl modperl_util.c modperl_util.h
  Log:
  add modperl_perl_av_push_elts_ref() function
  
  Revision  Changes    Path
  1.21      +12 -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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- modperl_util.c    2001/10/06 01:03:27     1.20
  +++ modperl_util.c    2001/10/06 23:27:35     1.21
  @@ -387,6 +387,18 @@
       return NULL;
   }
   
  +MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src)
  +{
  +    I32 i, j, src_fill = AvFILLp(src), dst_fill = AvFILLp(dst);
  +
  +    av_extend(dst, src_fill);
  +    AvFILLp(dst) += src_fill+1;
  +
  +    for (i=dst_fill+1, j=0; j<=AvFILLp(src); i++, j++) {
  +        AvARRAY(dst)[i] = SvREFCNT_inc(AvARRAY(src)[j]);
  +    }
  +}
  +
   MP_INLINE
   SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
                          char *key, SV *sv_val)
  
  
  
  1.21      +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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- modperl_util.h    2001/10/06 01:03:27     1.20
  +++ modperl_util.h    2001/10/06 23:27:35     1.21
  @@ -66,6 +66,8 @@
   MP_INLINE void *modperl_hash_tied_object(pTHX_ const char *classname,
                                            SV *tsv);
   
  +MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src);
  +
   MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
                                    char *key, SV *sv_val);
       
  
  
  


Reply via email to