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 2002/03/29 17:16:43 UTC

cvs commit: modperl-2.0/xs/maps apache_structures.map apr_functions.map apr_types.map

dougm       02/03/29 08:16:43

  Modified:    src/modules/perl modperl_filter.c
               t/filter/TestFilter buckets.pm input_body.pm input_msg.pm
               xs/APR/Brigade APR__Brigade.h
               xs/maps  apache_structures.map apr_functions.map
                        apr_types.map
  Log:
  adjust to recent bucket api changes
  
  Revision  Changes    Path
  1.33      +11 -6     modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- modperl_filter.c	10 Mar 2002 00:09:52 -0000	1.32
  +++ modperl_filter.c	29 Mar 2002 16:16:43 -0000	1.33
  @@ -5,6 +5,7 @@
   MP_INLINE apr_status_t modperl_wbucket_pass(modperl_wbucket_t *wb,
                                               const char *buf, apr_ssize_t len)
   {
  +    apr_bucket_alloc_t *ba = (*wb->filters)->c->bucket_alloc;
       apr_bucket_brigade *bb;
       apr_bucket *bucket;
   
  @@ -28,8 +29,8 @@
           }
       }
   
  -    bb = apr_brigade_create(wb->pool);
  -    bucket = apr_bucket_transient_create(buf, len);
  +    bb = apr_brigade_create(wb->pool, ba);
  +    bucket = apr_bucket_transient_create(buf, len, ba);
       APR_BRIGADE_INSERT_TAIL(bb, bucket);
   
       MP_TRACE_f(MP_FUNC, "buffer length=%d\n", len);
  @@ -162,16 +163,20 @@
   
   MP_INLINE static apr_status_t send_eos(ap_filter_t *f)
   {
  -    apr_bucket_brigade *bb = apr_brigade_create(MP_FILTER_POOL(f));
  -    apr_bucket *b = apr_bucket_eos_create();
  +    apr_bucket_alloc_t *ba = f->c->bucket_alloc;
  +    apr_bucket_brigade *bb = apr_brigade_create(MP_FILTER_POOL(f),
  +                                                ba);
  +    apr_bucket *b = apr_bucket_eos_create(ba);
       APR_BRIGADE_INSERT_TAIL(bb, b);
       return ap_pass_brigade(f->next, bb);
   }
   
   MP_INLINE static apr_status_t send_flush(ap_filter_t *f)
   {
  -    apr_bucket_brigade *bb = apr_brigade_create(MP_FILTER_POOL(f));
  -    apr_bucket *b = apr_bucket_flush_create();
  +    apr_bucket_alloc_t *ba = f->c->bucket_alloc;
  +    apr_bucket_brigade *bb = apr_brigade_create(MP_FILTER_POOL(f),
  +                                                ba);
  +    apr_bucket *b = apr_bucket_flush_create(ba);
       APR_BRIGADE_INSERT_TAIL(bb, b);
       return ap_pass_brigade(f->next, bb);
   }
  
  
  
  1.5       +3 -1      modperl-2.0/t/filter/TestFilter/buckets.pm
  
  Index: buckets.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/buckets.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- buckets.pm	21 Dec 2001 11:30:38 -0000	1.4
  +++ buckets.pm	29 Mar 2002 16:16:43 -0000	1.5
  @@ -15,6 +15,8 @@
   
       plan tests => 4;
   
  +    my $ba = $filter->r->connection->bucket_alloc;
  +
       #should only have 1 bucket from the response() below
       for (my $bucket = $bb->first; $bucket; $bucket = $bb->next($bucket)) {
           ok $bucket->type->name;
  @@ -25,7 +27,7 @@
   
       my $tests = Apache::TestToString->finish;
   
  -    my $brigade = APR::Brigade->new($filter->r->pool);
  +    my $brigade = APR::Brigade->new($filter->r->pool, $ba);
       my $bucket = APR::Bucket->new($tests);
   
       $brigade->insert_tail($bucket);
  
  
  
  1.10      +3 -1      modperl-2.0/t/filter/TestFilter/input_body.pm
  
  Index: input_body.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/input_body.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- input_body.pm	20 Jan 2002 18:37:05 -0000	1.9
  +++ input_body.pm	29 Mar 2002 16:16:43 -0000	1.10
  @@ -13,7 +13,9 @@
   sub handler : FilterRequestHandler {
       my($filter, $bb, $mode, $block, $readbytes) = @_;
   
  -    my $ctx_bb = APR::Brigade->new($filter->r->pool);
  +    my $ba = $filter->r->connection->bucket_alloc;
  +
  +    my $ctx_bb = APR::Brigade->new($filter->r->pool, $ba);
   
       my $rv = $filter->next->get_brigade($ctx_bb, $mode, $block, $readbytes);
   
  
  
  
  1.10      +2 -1      modperl-2.0/t/filter/TestFilter/input_msg.pm
  
  Index: input_msg.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/input_msg.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- input_msg.pm	20 Jan 2002 18:37:05 -0000	1.9
  +++ input_msg.pm	29 Mar 2002 16:16:43 -0000	1.10
  @@ -14,7 +14,8 @@
   sub handler : FilterConnectionHandler {
       my($filter, $bb, $mode, $block, $readbytes) = @_;
   
  -    my $ctx_bb = APR::Brigade->new($filter->c->pool);
  +    my $c = $filter->c;
  +    my $ctx_bb = APR::Brigade->new($c->pool, $c->bucket_alloc);
   
       my $rv = $filter->next->get_brigade($ctx_bb, $mode, $block, $readbytes);
   
  
  
  
  1.4       +3 -2      modperl-2.0/xs/APR/Brigade/APR__Brigade.h
  
  Index: APR__Brigade.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/APR/Brigade/APR__Brigade.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- APR__Brigade.h	19 Apr 2001 17:37:37 -0000	1.3
  +++ APR__Brigade.h	29 Mar 2002 16:16:43 -0000	1.4
  @@ -1,8 +1,9 @@
   static MP_INLINE
   apr_bucket_brigade *mpxs_apr_brigade_create(pTHX_ SV *CLASS,
  -                                            apr_pool_t *p)
  +                                            apr_pool_t *p,
  +                                            apr_bucket_alloc_t *ba)
   {
  -    return apr_brigade_create(p);
  +    return apr_brigade_create(p, ba);
   }
   
   #define get_brigade(brigade, fetch) \
  
  
  
  1.12      +1 -0      modperl-2.0/xs/maps/apache_structures.map
  
  Index: apache_structures.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_structures.map,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- apache_structures.map	15 Nov 2001 18:19:56 -0000	1.11
  +++ apache_structures.map	29 Mar 2002 16:16:43 -0000	1.12
  @@ -114,6 +114,7 @@
      notes
      input_filters
      output_filters
  +   bucket_alloc
   </conn_rec>
   
   !<server_addr_rec>
  
  
  
  1.35      +1 -1      modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- apr_functions.map	31 Jan 2002 02:41:27 -0000	1.34
  +++ apr_functions.map	29 Mar 2002 16:16:43 -0000	1.35
  @@ -71,7 +71,7 @@
    apr_sockaddr_port_get
   
   MODULE=APR::Brigade
  - apr_brigade_create | mpxs_ | SV *:CLASS, p | new
  + apr_brigade_create | mpxs_ | SV *:CLASS, p, list | new
    apr_brigade_destroy
   !apr_brigade_partition
    apr_brigade_printf
  
  
  
  1.14      +1 -0      modperl-2.0/xs/maps/apr_types.map
  
  Index: apr_types.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_types.map,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- apr_types.map	15 Mar 2002 02:03:57 -0000	1.13
  +++ apr_types.map	29 Mar 2002 16:16:43 -0000	1.14
  @@ -23,6 +23,7 @@
   #bucket stuff
   struct apr_bucket           | APR::Bucket
   struct apr_bucket_brigade   | APR::Brigade
  +struct apr_bucket_alloc_t   | APR::BucketAlloc
   apr_brigade_flush           | UNDEFINED
   struct apr_bucket_type_t    | APR::BucketType
   apr_read_type_e             | IV