summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorTomasz Konojacki <me@xenu.pl>2022-05-16 20:26:16 +0200
committerxenu <me@xenu.pl>2022-05-17 20:43:37 +0200
commitc372fad01ad7428f1574b75cfb81a596aad45953 (patch)
treeb6546ee68fa3c694f17ae0b739b2ce08f5b5920d /handy.h
parent72c1cbb43c4dc5b9392f0508fdd67dc71ce4d215 (diff)
downloadperl-c372fad01ad7428f1574b75cfb81a596aad45953.tar.gz
perlapi: document safe(?:c|re|m)alloc
They're widely used on CPAN, especially safemalloc.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/handy.h b/handy.h
index d2e4a011df..a0ffee1b16 100644
--- a/handy.h
+++ b/handy.h
@@ -2520,6 +2520,8 @@ typedef U32 line_t;
=for apidoc_section $memory
=for apidoc Am|void|Newx|void* ptr|int nitems|type
+=for apidoc_item |void*|safemalloc|void *ptr
+
The XSUB-writer's interface to the C C<malloc> function.
Memory obtained by this should B<ONLY> be freed with L</"Safefree">.
@@ -2537,12 +2539,16 @@ cast. See also C<L</Newx>>.
Memory obtained by this should B<ONLY> be freed with L</"Safefree">.
=for apidoc Am|void|Newxz|void* ptr|int nitems|type
+=for apidoc_item |void*|safecalloc|size_t nitems|size_t item_size
+
The XSUB-writer's interface to the C C<malloc> function. The allocated
memory is zeroed with C<memzero>. See also C<L</Newx>>.
Memory obtained by this should B<ONLY> be freed with L</"Safefree">.
=for apidoc Am|void|Renew|void* ptr|int nitems|type
+=for apidoc_item |void*|saferealloc|void *ptr|size_t size
+
The XSUB-writer's interface to the C C<realloc> function.
Memory obtained by this should B<ONLY> be freed with L</"Safefree">.