--- al.pod 2002/10/18 09:09:18 1.9
+++ al.pod 2002/10/18 12:23:35 1.10
@@ -186,15 +186,18 @@
Example: C<al_prepend_bytes(al, "Hello world\n", 12);>
-=item al_rc_t B<al_attach_buffer>(al_t *I<al>, char *I<p>, size_t I<n>);
+=item al_rc_t B<al_attach_buffer>(al_t *I<al>, char *I<p>, size_t I<n>, void (*I<freemem>)(char *, size_t, void *), void *I<u>);
Attach the storage array starting at I<p> with size I<n> at the end of
the assembly line. Its content becomes part of the assembly line
and is subject to assembly line operations. The storage array must stay
-in scope for the whole life time of the assembly line, there is no way
-to detach it from the assembly line.
+in scope until it is no longer referenced by the assembly line. When
+this happens the function I<freemem> is called with the original pointer
+I<p>, size I<n> and an arbitrary pointer I<u>. Passing a NULL pointer
+for I<freemem> is valid, then no callback takes place, which might be
+appropriate for static buffers.
-Example: C<char store[] = "foo\n"; al_attach_buffer(al, store, sizeof(store));>
+Example: C<char store[] = "foo\n"; al_attach_buffer(al, store, sizeof(store), NULL, NULL);>
=item al_rc_t B<al_splice>(al_t *I<al>, size_t I<off>, size_t I<n>, al_t *I<nal>, al_t *I<tal>);
|