perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/t/net/perl api.pl
Date Wed, 16 Sep 1998 16:27:04 GMT
dougm       98/09/16 09:27:04

  Modified:    src/modules/perl Apache.xs mod_perl_xs.h
               t/net/perl api.pl
  Log:
  allow file tests ala:
   my $size = -s $r->finfo
  as shortcut to:
   $r->finfo;
   my $size = -s _;
  
  Revision  Changes    Path
  1.57      +10 -2     modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- Apache.xs	1998/09/03 01:49:47	1.56
  +++ Apache.xs	1998/09/16 16:27:02	1.57
  @@ -1707,9 +1707,17 @@
   #  char *args;			/* QUERY_ARGS, if any */
   #  struct stat finfo;		/* ST_MODE set to zero if no such file */
   
  -void
  -mod_perl_finfo(r)
  +SV *
  +finfo(r)
       Apache r
  +
  +    CODE:
  +    statcache = r->finfo;
  +    if(GIMME_V == G_VOID) XSRETURN_UNDEF;
  +    RETVAL = newRV_noinc((SV*)gv_fetchpv("_", TRUE, SVt_PVIO));
  +
  +    OUTPUT:
  +    RETVAL
   
   char *
   uri(r, ...)
  
  
  
  1.2       +0 -4      modperl/src/modules/perl/mod_perl_xs.h
  
  Index: mod_perl_xs.h
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl_xs.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_perl_xs.h	1998/07/28 17:09:19	1.1
  +++ mod_perl_xs.h	1998/09/16 16:27:02	1.2
  @@ -33,10 +33,6 @@
   #define MP_CHECK_REQ(r,f) \
       if(!r) croak("`%s' called without setting Apache->request!", f)
   
  -/* request_rec */
  -#define mod_perl_finfo(r) \
  -statcache = r->finfo
  -
   /* for Apache::fork, should no longer need */
   #ifdef Apache__fork
   extern listen_rec *listeners;
  
  
  
  1.30      +2 -1      modperl/t/net/perl/api.pl
  
  Index: api.pl
  ===================================================================
  RCS file: /export/home/cvs/modperl/t/net/perl/api.pl,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- api.pl	1998/09/03 01:49:48	1.29
  +++ api.pl	1998/09/16 16:27:03	1.30
  @@ -18,7 +18,7 @@
   
   my $tests = 50;
   my $is_win32 = WIN32;
  -++$tests unless $is_win32;
  +$tests += 2 unless $is_win32;
   my $test_get_set = Apache->can('set_handlers') && ($tests += 4);
   my $test_custom_response = (MODULE_MAGIC_NUMBER >= 19980324) && $tests++;
   my $test_dir_config = $INC{'Apache/TestDirectives.pm'} && ($tests += 7);
  @@ -56,6 +56,7 @@
     my $ft_def = -s _;
     print "Apache.pm == $ft_s, $0 == $ft_def\n";
     test ++$i, $ft_s != $ft_def;
  +  test ++$i, (-s $r->finfo) == $ft_def;
   }
   
   my $loc = $r->location;
  
  
  

Mime
View raw message