stas        02/01/28 21:52:24

  Modified:    src/modules/perl modperl_util.c
  Log:
  if undef is passed try to get the pool from the current request
  
  Revision  Changes    Path
  1.35      +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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- modperl_util.c    29 Jan 2002 04:49:37 -0000      1.34
  +++ modperl_util.c    29 Jan 2002 05:52:24 -0000      1.35
  @@ -174,6 +174,18 @@
       char *classname = NULL;
       IV ptr = 0;
   
  +    /* get the pool from the current request if applicable */
  +    if (obj == &PL_sv_undef) {
  +        request_rec *r = NULL;
  +        (void)modperl_tls_get_request_rec(&r);
  +
  +        if (r) {
  +            return r->pool;
  +        }
  +
  +        return NULL;
  +    }
  +    
       if ((SvROK(obj) && (SvTYPE(SvRV(obj)) == SVt_PVMG))) {
           ptr = SvObjIV(obj);
           classname = SvCLASS(obj);
  
  
  


Reply via email to