You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2001/05/04 00:42:35 UTC

cvs commit: modperl-2.0/xs/maps modperl_functions.map

dougm       01/05/03 15:42:35

  Modified:    t/response/TestAPI aplog.pm
               xs/Apache/Log Apache__Log.h
               xs/maps  modperl_functions.map
  Log:
  add Apache::LOG_MARK function
  
  Revision  Changes    Path
  1.3       +5 -1      modperl-2.0/t/response/TestAPI/aplog.pm
  
  Index: aplog.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/aplog.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- aplog.pm	2001/05/03 22:24:01	1.2
  +++ aplog.pm	2001/05/03 22:42:26	1.3
  @@ -14,7 +14,7 @@
       my $r = shift;
       my $s = $r->server;
   
  -    plan $r, tests => (@LogLevels * 2) + 3;
  +    plan $r, tests => (@LogLevels * 2) + 5;
   
       my $rlog = $r->log;
   
  @@ -25,6 +25,10 @@
       ok $slog->isa('Apache::Log::Server');
   
       $rlog->info($package, " test in progress");
  +
  +    my($file, $line) = Apache::LOG_MARK;
  +    ok $file eq __FILE__;
  +    ok $line == __LINE__ - 2;
   
       for my $method (@LogLevels) {
           #wrap in sub {}, else Test.pm tries to run the return value of ->can
  
  
  
  1.4       +18 -0     modperl-2.0/xs/Apache/Log/Apache__Log.h
  
  Index: Apache__Log.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Log/Apache__Log.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Apache__Log.h	2001/05/03 20:20:00	1.3
  +++ Apache__Log.h	2001/05/03 22:42:30	1.4
  @@ -164,3 +164,21 @@
   
       XSRETURN_EMPTY;
   }
  +
  +static XS(MPXS_Apache_LOG_MARK)
  +{
  +    dXSARGS;
  +    ax = ax; /* -Wall */;
  +
  +    mpxs_PPCODE({
  +        COP *cop = PL_curcop;
  +
  +        if (items) {
  +            Perl_croak(aTHX_ "usage %s::%s()", mpxs_cv_name());
  +        }
  +
  +        EXTEND(SP, 2);
  +        PUSHs_mortal_pv(CopFILE(cop));
  +        PUSHs_mortal_iv(CopLINE(cop));
  +    });
  +}
  
  
  
  1.11      +4 -0      modperl-2.0/xs/maps/modperl_functions.map
  
  Index: modperl_functions.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- modperl_functions.map	2001/05/03 06:20:59	1.10
  +++ modperl_functions.map	2001/05/03 22:42:33	1.11
  @@ -49,3 +49,7 @@
   PACKAGE=Apache::Server
   SV *:DEFINE_log | | SV *:obj
   
  +PACKAGE=Apache
  +
  +DEFINE_LOG_MARK | MPXS_Apache_LOG_MARK | ...
  +