perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r123523 - /perl/modperl/docs/trunk/src/docs/2.0/api/APR/Bucket.pod /perl/modperl/docs/trunk/src/docs/2.0/api/APR/BucketAlloc.pod
Date Tue, 28 Dec 2004 16:36:42 GMT
Author: stas
Date: Tue Dec 28 08:36:42 2004
New Revision: 123523

URL: http://svn.apache.org/viewcvs?view=rev&rev=123523
Log:
APR::Bucket::alloc_create moved  to APR::BucketAlloc::new
APR::Bucket::alloc_destroy moved to APR::BucketAlloc::destroy

Modified:
   perl/modperl/docs/trunk/src/docs/2.0/api/APR/Bucket.pod
   perl/modperl/docs/trunk/src/docs/2.0/api/APR/BucketAlloc.pod

Modified: perl/modperl/docs/trunk/src/docs/2.0/api/APR/Bucket.pod
Url: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/api/APR/Bucket.pod?view=diff&rev=123523&p1=perl/modperl/docs/trunk/src/docs/2.0/api/APR/Bucket.pod&r1=123522&p2=perl/modperl/docs/trunk/src/docs/2.0/api/APR/Bucket.pod&r2=123523
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/api/APR/Bucket.pod	(original)
+++ perl/modperl/docs/trunk/src/docs/2.0/api/APR/Bucket.pod	Tue Dec 28 08:36:42 2004
@@ -10,9 +10,6 @@
   use APR::Bucket ();
   my $ba = $c->bucket_alloc;
   
-  $ba2 = APR::Bucket::alloc_create($pool);
-  APR::Bucket::alloc_destroy($ba2);
-  
   $b1 = APR::Bucket->new($ba, "aaa");
   $b2 = APR::Bucket::eos_create($ba);
   $b3 = APR::Bucket::flush_create($ba);
@@ -152,71 +149,6 @@
 it's better to call C<L<delete|/C_delete_>> which does exactly that.
 
 
-
-
-
-
-=head2 C<alloc_create>
-
-Create an C<APR::BucketAlloc> object:
-
-  $ba = APR::Bucket::alloc_create($pool);
-
-=over 4
-
-=item arg1: C<$pool>
-( C<L<APR::Pool object|docs::2.0::api::APR::Pool>> )
-
-The pool used to create this object.
-
-=item ret: C<$ba>
-( C<L<APR::BucketAlloc object|docs::2.0::api::APR::BucketAlloc>> )
-
-The new object.
-
-=item since: 1.99_17
-
-=back
-
-This bucket allocation list (freelist) is used to create new buckets
-and bucket brigades.  Normally it is not necesssary to create them,
-since the existing bucket brigades and/or connection objects in
-modperl 2.0 provide them automatically.
-
-Example:
-
-  use APR::Bucket ();
-  use Apache::Connection ();
-  my $ba = APR::Bucket::alloc_create($c->pool);
-  my $eos_b = APR::Bucket::eos_create($ba);
-
-
-
-
-
-=head2 C<alloc_destroy>
-
-Destroy an C<L<APR::BucketAlloc
-object|docs::2.0::api::APR::BucketAlloc>>:
-
-  APR::Bucket::alloc_destroy($ba);
-
-=over 4
-
-=item arg1: C<$ba>
-( C<L<APR::BucketAlloc object|docs::2.0::api::APR::BucketAlloc>> )
-
-The freelist to destroy.
-
-=item ret: no return value
-
-=item since: 1.99_17
-
-=back
-
-Once destroyed this object may not be used again.  Normally it is not
-necessary to destroy allocators, since the pool which created them
-will destroy them during pool cleanup.
 
 
 

Modified: perl/modperl/docs/trunk/src/docs/2.0/api/APR/BucketAlloc.pod
Url: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/api/APR/BucketAlloc.pod?view=diff&rev=123523&p1=perl/modperl/docs/trunk/src/docs/2.0/api/APR/BucketAlloc.pod&r1=123522&p2=perl/modperl/docs/trunk/src/docs/2.0/api/APR/BucketAlloc.pod&r2=123523
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/api/APR/BucketAlloc.pod	(original)
+++ perl/modperl/docs/trunk/src/docs/2.0/api/APR/BucketAlloc.pod	Tue Dec 28 08:36:42 2004
@@ -7,6 +7,11 @@
 
 =head1 Synopsis
 
+  use APR::BucketAlloc ();
+  $ba = APR::BucketAlloc->new($pool);
+  $ba->destroy;
+
+
 
 
 
@@ -14,23 +19,89 @@
 
 C<APR::BucketAlloc> is used for bucket allocation.
 
-At the moment C<APR::BucketAlloc> is a virtual class, which doesn't
-exists as a module/package - so you don't need to load it, nor does it
-contain any callable methods or functions.
-
-Objects blessed into C<APR::BucketAlloc> class, are returned by
-C<L<$c-E<gt>bucket_alloc|docs::2.0::api::Apache::Connection/C_bucket_alloc_>>,
-C<L<APR::Bucket::alloc_create|docs::2.0::api::APR::Bucket/C_alloc_create_>>
+
+
+
+
+
+=head2 C<new>
+
+Create an C<APR::BucketAlloc> object:
+
+  $ba = APR::BucketAlloc->new($pool);
+
+=over 4
+
+=item class: C<APR::BucketAlloc>
+
+=item arg1: C<$pool>
+( C<L<APR::Pool object|docs::2.0::api::APR::Pool>> )
+
+The pool used to create this object.
+
+=item ret: C<$ba>
+( C<L<APR::BucketAlloc object|docs::2.0::api::APR::BucketAlloc>> )
+
+The new object.
+
+=item since: 1.99_20
+
+=back
+
+This bucket allocation list (freelist) is used to create new buckets
+(via C<L<APR::Bucket-E<gt>new|docs::2.0::api::APR::Bucket/C_new_>>)
+and bucket brigades (via
+C<L<APR::Brigade-E<gt>new|docs::2.0::api::APR::Brigade/C_new_>>).
+
+You only need to use this method if you aren't running under httpd.
+If you are running under mod_perl, you already have a bucket
+allocation available via
+C<L<$c-E<gt>bucket_alloc|docs::2.0::api::Apache::Connection/C_bucket_alloc_>>
 and
-C<L<$bb-E<gt>bucket_alloc|docs::2.0::api::APR::Brigade/C_bucket_alloc_>>,
-and used by
-C<L<APR::Brigade-E<gt>new|docs::2.0::api::APR::Brigade/C_new_>> and
-C<L<APR::Bucket-E<gt>new|docs::2.0::api::APR::Bucket/C_new_>>.
+C<L<$bb-E<gt>bucket_alloc|docs::2.0::api::APR::Brigade/C_bucket_alloc_>>.
+
+Example:
+
+  use APR::BucketAlloc ();
+  use APR::Pool ();
+  my $ba = APR::BucketAlloc->(APR::Pool->pool);
+  my $eos_b = APR::Bucket::eos_create($ba);
+
+
+
+
+
+
+=head2 C<destroy>
+
+Destroy an C<L<APR::BucketAlloc
+object|docs::2.0::api::APR::BucketAlloc>>:
+
+  $ba->destroy;
+
+=over 4
+
+=item arg1: C<$ba>
+( C<L<APR::BucketAlloc object|docs::2.0::api::APR::BucketAlloc>> )
+
+The freelist to destroy.
+
+=item ret: no return value
+
+=item since: 1.99_20
+
+=back
 
-C<L<APR::Bucket::alloc_create|docs::2.0::api::APR::Bucket/C_alloc_create_>>
-can be used outside the httpd.
+Once destroyed this object may not be used again.
 
+You need to destroy C<$ba> B<only> if you have created it via
+C<L<APR::BucketAlloc-E<gt>new|/C_new_>>. If you try to destroy an
+allocation not created by this method, you will get a segmentation
+fault.
 
+Moreover normally it is not necessary to destroy allocators, since the
+pool which created them will destroy them during that pool's cleanup
+phase.
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message