stas 2004/08/20 14:11:01
Modified: xs/maps apr_functions.map
xs/APR/Bucket APR__Bucket.h
t/response/TestAPR bucket.pm
. Changes
Log:
APR::Bucket: add delete() and destroy() methods
Revision Changes Path
1.84 +2 -0 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.83
retrieving revision 1.84
diff -u -u -r1.83 -r1.84
--- apr_functions.map 15 Jul 2004 06:23:21 -0000 1.83
+++ apr_functions.map 20 Aug 2004 21:11:00 -0000 1.84
@@ -119,6 +119,8 @@
mpxs_APR__Bucket_read | | bucket, buffer, block=APR_BLOCK_READ
#modperl_bucket_sv_create
mpxs_APR__Bucket_new | | classname, sv, offset=0, len=0
+ void:DEFINE_destroy | | apr_bucket:bucket
+ void:DEFINE_delete | | apr_bucket:bucket
>apr_bucket_alloc
>apr_bucket_alloc_create
>apr_bucket_alloc_destroy
1.13 +3 -0 modperl-2.0/xs/APR/Bucket/APR__Bucket.h
Index: APR__Bucket.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/Bucket/APR__Bucket.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -u -r1.12 -r1.13
--- APR__Bucket.h 12 Jul 2004 07:32:07 -0000 1.12
+++ APR__Bucket.h 20 Aug 2004 21:11:00 -0000 1.13
@@ -15,6 +15,9 @@
#include "modperl_bucket.h"
+#define mpxs_APR__Bucket_delete apr_bucket_delete
+#define mpxs_APR__Bucket_destroy apr_bucket_destroy
+
static apr_bucket *mpxs_APR__Bucket_new(pTHX_ SV *classname, SV *sv,
apr_off_t offset, apr_size_t len)
{
1.10 +18 -1 modperl-2.0/t/response/TestAPR/bucket.pm
Index: bucket.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/bucket.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -u -r1.9 -r1.10
--- bucket.pm 15 Aug 2004 06:25:47 -0000 1.9
+++ bucket.pm 20 Aug 2004 21:11:00 -0000 1.10
@@ -22,7 +22,7 @@
my $r = shift;
- plan $r, tests => 18 + TestAPRlib::bucket::num_of_tests();
+ plan $r, tests => 20 + TestAPRlib::bucket::num_of_tests();
TestAPRlib::bucket::test();
@@ -120,6 +120,23 @@
# and no next
ok t_cmp($bb->next($b_first), undef, "no next bucket");
+ }
+
+ # delete+destroy
+ {
+ my $bb = APR::Brigade->new($r->pool, $ba);
+ $bb->insert_head(APR::Bucket->new("a"));
+ $bb->insert_head(APR::Bucket->new("b"));
+
+ my $b1 = $bb->first;
+ $b1->remove;
+ $b1->destroy;
+ ok 1;
+
+ # delete = remove + destroy
+ my $b2 = $bb->first;
+ $b2->delete;
+ ok 1;
}
return Apache::OK;
1.459 +2 -1 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.458
retrieving revision 1.459
diff -u -u -r1.458 -r1.459
--- Changes 20 Aug 2004 18:44:03 -0000 1.458
+++ Changes 20 Aug 2004 21:11:00 -0000 1.459
@@ -12,10 +12,11 @@
=item 1.99_16-dev
+APR::Bucket: add delete() and destroy() methods [Stas]
-=item 1.99_15 - Aug 20, 2004
+=item 1.99_15 - Aug 20, 2004
replace the memory allocation for modperl filter handlers to use a
temporary subpool of the ap_filter_t object. previously using perl's