stas        01/12/13 20:35:28

  Modified:    src/modules/perl modperl_util.c modperl_util.h
  Log:
  - porting modperl_perl_gensym from 1.x
  
  Revision  Changes    Path
  1.32      +10 -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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- modperl_util.c    2001/11/19 23:24:46     1.31
  +++ modperl_util.c    2001/12/14 04:35:28     1.32
  @@ -572,3 +572,13 @@
   {
       return gv_stashpv(name, FALSE) ? 1 : 0;
   }
  +
  +/* same as Symbol::gensym() */
  +SV *modperl_perl_gensym(pTHX_ char *pack)
  +{
  +    GV *gv = newGVgen(pack);
  +    SV *rv = newRV((SV*)gv);
  +    (void)hv_delete(gv_stashpv(pack, TRUE), 
  +                    GvNAME(gv), GvNAMELEN(gv), G_DISCARD);
  +    return rv;
  +}
  
  
  
  1.31      +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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- modperl_util.h    2001/11/06 18:39:41     1.30
  +++ modperl_util.h    2001/12/14 04:35:28     1.31
  @@ -112,4 +112,6 @@
   
   MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name);
   
  +SV *modperl_perl_gensym(pTHX_ char *pack);
  +    
   #endif /* MODPERL_UTIL_H */
  
  
  


Reply via email to