dougm       02/05/29 09:31:44

  Modified:    .        Changes
               lib/ModPerl WrapXS.pm
               src/modules/perl modperl_util.c
  Log:
  use SvOK(sv) instead of sv == &PL_sv_undef to detect undef values in xs
  
  Revision  Changes    Path
  1.14      +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Changes   24 May 2002 17:59:13 -0000      1.13
  +++ Changes   29 May 2002 16:31:44 -0000      1.14
  @@ -10,6 +10,9 @@
   
   =item 1.99_02-dev
   
  +use SvOK(sv) instead of sv == &PL_sv_undef to detect undef values in xs
  +[Stephen Clouse <[EMAIL PROTECTED]>]
  +
   complete Apache::Util 1.x compat
   
   added Apache::MPM_IS_THREADED constant
  
  
  
  1.45      +2 -2      modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- WrapXS.pm 23 May 2002 22:19:52 -0000      1.44
  +++ WrapXS.pm 29 May 2002 16:31:44 -0000      1.45
  @@ -156,8 +156,8 @@
       if ($e->{class} eq 'PV') {
           if (my $pool = $e->{pool}) {
               $pool .= '(obj)';
  -            $val = "((ST(1) == &PL_sv_undef) ? NULL :
  -                    apr_pstrndup($pool, val, val_len))"
  +            $val = "(SvOK(ST(1)) ?
  +                    apr_pstrndup($pool, val, val_len) : NULL)"
           }
       }
   
  
  
  
  1.43      +2 -2      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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- modperl_util.c    23 May 2002 22:18:47 -0000      1.42
  +++ modperl_util.c    29 May 2002 16:31:44 -0000      1.43
  @@ -183,7 +183,7 @@
        * get the pool from the current request
        * else return the global pool
        */
  -    if (obj == &PL_sv_undef) {
  +    if (!SvOK(obj)) {
           request_rec *r = NULL;
           (void)modperl_tls_get_request_rec(&r);
   
  @@ -587,7 +587,7 @@
               SvTAINTED_on(retval); 
           } 
       }
  -    else if (sv_val == &PL_sv_undef) { /* val was passed in as undef */
  +    else if (!SvOK(sv_val)) { /* val was passed in as undef */
           apr_table_unset(table, key); 
       }
       else { 
  
  
  


Reply via email to