perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
Date Wed, 22 Jan 2003 03:19:43 GMT
stas        2003/01/21 19:19:43

  Modified:    .        Changes
               src/modules/perl modperl_io.c modperl_io.h
               t/modperl .cvsignore
               todo     api.txt
               xs/Apache/RequestIO Apache__RequestIO.h
               xs/maps  modperl_functions.map
               xs/tables/current/ModPerl FunctionTable.pm
  Added:       t/response/TestModperl request_rec_tie_api.pm
  Log:
  - expose useful macros from modperl_io.c via modperl_io.h
  - add $r->FILENO implementation
  - add a test
  
  Revision  Changes    Path
  1.107     +2 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- Changes	20 Jan 2003 07:54:52 -0000	1.106
  +++ Changes	22 Jan 2003 03:19:43 -0000	1.107
  @@ -10,6 +10,8 @@
   
   =item 1.99_09-dev
   
  +Add $r->FILENO implementation [Stas]
  +
   Apache::Test: Support <NoAutoConfig> </NoAutoConfig> blocks in .pm
   files, so we can have a full manual control over generated config
   sections. These sections are fully parsed and variables are
  
  
  
  1.1                  modperl-2.0/t/response/TestModperl/request_rec_tie_api.pm
  
  Index: request_rec_tie_api.pm
  ===================================================================
  package TestModperl::request_rec_tie_api;
  
  use strict;
  use warnings FATAL => 'all';
  
  use Apache::RequestIO ();
  
  use Apache::Test;
  use Apache::TestUtil;
  
  use Apache::Const -compile => 'OK';
  
  sub handler {
      my $r = shift;
  
      plan $r, tests => 1;
  
      ok t_cmp(fileno(STDOUT), $r->FILENO(), "FILENO");
  
      return Apache::OK;
  }
  
  1;
  
  
  
  1.9       +0 -13     modperl-2.0/src/modules/perl/modperl_io.c
  
  Index: modperl_io.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_io.c	24 Mar 2002 02:41:29 -0000	1.8
  +++ modperl_io.c	22 Jan 2003 03:19:43 -0000	1.9
  @@ -1,18 +1,5 @@
   #include "mod_perl.h"
   
  -/*
  - * bleedperl change #11639 switch tied handle magic
  - * from living in the gv to the GvIOp(gv), so we have to deal
  - * with both to support 5.6.x
  - */
  -#if ((PERL_REVISION == 5) && (PERL_VERSION >= 7))
  -#   define TIEHANDLE_SV(handle) (SV*)GvIOp((SV*)handle)
  -#else
  -#   define TIEHANDLE_SV(handle) (SV*)handle
  -#endif
  -
  -#define dHANDLE(name) GV *handle = gv_fetchpv(name, TRUE, SVt_PVIO)
  -
   #define TIEHANDLE(handle,r) \
   modperl_io_handle_tie(aTHX_ handle, "Apache::RequestRec", (void *)r)
   
  
  
  
  1.2       +13 -0     modperl-2.0/src/modules/perl/modperl_io.h
  
  Index: modperl_io.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_io.h	5 May 2001 22:06:41 -0000	1.1
  +++ modperl_io.h	22 Jan 2003 03:19:43 -0000	1.2
  @@ -1,6 +1,19 @@
   #ifndef MODPERL_IO_H
   #define MODPERL_IO_H
   
  +/*
  + * bleedperl change #11639 switch tied handle magic
  + * from living in the gv to the GvIOp(gv), so we have to deal
  + * with both to support 5.6.x
  + */
  +#if ((PERL_REVISION == 5) && (PERL_VERSION >= 7))
  +#   define TIEHANDLE_SV(handle) (SV*)GvIOp((SV*)handle)
  +#else
  +#   define TIEHANDLE_SV(handle) (SV*)handle
  +#endif
  +
  +#define dHANDLE(name) GV *handle = gv_fetchpv(name, TRUE, SVt_PVIO)
  +
   #define IoFLUSH_off(gv) \
   IoFLAGS(GvIOp((gv))) &= ~IOf_FLUSH
   
  
  
  
  1.11      +1 -0      modperl-2.0/t/modperl/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/modperl/.cvsignore,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- .cvsignore	22 Oct 2002 15:13:22 -0000	1.10
  +++ .cvsignore	22 Jan 2003 03:19:43 -0000	1.11
  @@ -10,3 +10,4 @@
   methodobj.t
   method.t
   setauth.t
  +request_rec_tie_api.t
  
  
  
  1.30      +1 -1      modperl-2.0/todo/api.txt
  
  Index: api.txt
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/todo/api.txt,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- api.txt	6 Dec 2002 16:19:36 -0000	1.29
  +++ api.txt	22 Jan 2003 03:19:43 -0000	1.30
  @@ -3,7 +3,7 @@
   ------------------------------------------
   
   tied filehandle interface:
  - -CLOSE, OPEN, EOF, TELL, SEEK, FILENO
  + -CLOSE, OPEN, EOF, TELL, SEEK
    -READLINE - proper implementation (see comment in Apache::compat)
   
   $r->finfo:
  
  
  
  1.31      +7 -0      modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h
  
  Index: Apache__RequestIO.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Apache__RequestIO.h	17 Jan 2003 03:08:31 -0000	1.30
  +++ Apache__RequestIO.h	22 Jan 2003 03:19:43 -0000	1.31
  @@ -237,6 +237,13 @@
   }
   
   static MP_INLINE
  +int mpxs_Apache__RequestRec_FILENO(pTHX_ request_rec *r)
  +{
  +    dHANDLE("STDOUT");
  +    return PerlIO_fileno(IoOFP(TIEHANDLE_SV(handle)));
  +}
  +
  +static MP_INLINE
   apr_status_t mpxs_Apache__RequestRec_sendfile(request_rec *r,
                                                 const char *filename,
                                                 apr_off_t offset,
  
  
  
  1.49      +1 -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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- modperl_functions.map	12 Jan 2003 02:33:27 -0000	1.48
  +++ modperl_functions.map	22 Jan 2003 03:19:43 -0000	1.49
  @@ -47,6 +47,7 @@
    apr_ssize_t:DEFINE_WRITE | | \
                request_rec *:r, SV *:buffer, apr_ssize_t:bufsiz=-1, int:offset=0
    mpxs_Apache__RequestRec_GETC
  + mpxs_Apache__RequestRec_FILENO
   
   MODULE=Apache::Response   PACKAGE=Apache::RequestRec
   DEFINE_send_cgi_header | | request_rec *:r, SV *:buffer
  
  
  
  1.97      +14 -0     modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- FunctionTable.pm	17 Jan 2003 03:08:31 -0000	1.96
  +++ FunctionTable.pm	22 Jan 2003 03:19:43 -0000	1.97
  @@ -5396,6 +5396,20 @@
       ]
     },
     {
  +    'return_type' => 'int',
  +    'name' => 'mpxs_Apache__RequestRec_FILENO',
  +    'args' => [
  +      {
  +        'type' => 'PerlInterpreter *',
  +        'name' => 'my_perl'
  +      },
  +      {
  +        'type' => 'request_rec *',
  +        'name' => 'r'
  +      },
  +    ]
  +  },
  +  {
       'return_type' => 'apr_status_t',
       'name' => 'mpxs_Apache__RequestRec_sendfile',
       'args' => [
  
  
  

Mime
View raw message