summaryrefslogtreecommitdiffstats
path: root/doc/man3/DEFINE_STACK_OF.pod
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-12-23 19:33:03 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-02-04 07:28:11 +0100
commitd53b437f9992f974c1623e9b9b9bdf053aefbcc3 (patch)
tree12b15a5d0a6e885be5e9118c5b4542c6234039f0 /doc/man3/DEFINE_STACK_OF.pod
parentb91a13f429570512bfee290e8ec50096b0667e45 (diff)
Allow NULL arg to OPENSSL_sk_{dup,deep_copy} returning empty stack
This simplifies many usages Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14040)
Diffstat (limited to 'doc/man3/DEFINE_STACK_OF.pod')
-rw-r--r--doc/man3/DEFINE_STACK_OF.pod12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/man3/DEFINE_STACK_OF.pod b/doc/man3/DEFINE_STACK_OF.pod
index 9088dc040b..b5908fead5 100644
--- a/doc/man3/DEFINE_STACK_OF.pod
+++ b/doc/man3/DEFINE_STACK_OF.pod
@@ -182,12 +182,14 @@ B<sk_I<TYPE>_sort>() sorts I<sk> using the supplied comparison function.
B<sk_I<TYPE>_is_sorted>() returns B<1> if I<sk> is sorted and B<0> otherwise.
-B<sk_I<TYPE>_dup>() returns a copy of I<sk>. Note the pointers in the copy
-are identical to the original.
+B<sk_I<TYPE>_dup>() returns a shallow copy of I<sk>
+or an empty stack if the passed stack is NULL.
+Note the pointers in the copy are identical to the original.
B<sk_I<TYPE>_deep_copy>() returns a new stack where each element has been
-copied. Copying is performed by the supplied copyfunc() and freeing by
-freefunc(). The function freefunc() is only called if an error occurs.
+copied or an empty stack if the passed stack is NULL.
+Copying is performed by the supplied copyfunc() and freeing by freefunc().
+The function freefunc() is only called if an error occurs.
=head1 NOTES
@@ -258,7 +260,7 @@ B<sk_I<TYPE>_is_sorted>() returns B<1> if the stack is sorted and B<0> if it is
not.
B<sk_I<TYPE>_dup>() and B<sk_I<TYPE>_deep_copy>() return a pointer to the copy
-of the stack.
+of the stack or NULL on error.
=head1 HISTORY