]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix internal documentation of ossl_namemap_num2name()
authorTomas Mraz <tomas@openssl.org>
Wed, 25 Jun 2025 10:21:53 +0000 (12:21 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 1 Jul 2025 17:11:09 +0000 (19:11 +0200)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/27889)

doc/internal/man3/ossl_namemap_new.pod

index 7f4940fc93419cdf03334107e3582e1e93118ad7..75c35f01ea0c16b99489b5040f98a797020a77f3 100644 (file)
@@ -4,7 +4,7 @@
 
 ossl_namemap_new, ossl_namemap_free, ossl_namemap_stored, ossl_namemap_empty,
 ossl_namemap_add_name, ossl_namemap_add_names,
-ossl_namemap_name2num, ossl_namemap_name2num_n,
+ossl_namemap_name2num, ossl_namemap_name2num_n, ossl_namemap_num2name,
 ossl_namemap_doall_names
 - internal number E<lt>-E<gt> name map
 
@@ -23,6 +23,8 @@ ossl_namemap_doall_names
  int ossl_namemap_name2num(const OSSL_NAMEMAP *namemap, const char *name);
  int ossl_namemap_name2num_n(const OSSL_NAMEMAP *namemap,
                              const char *name, size_t name_len);
+ const char *ossl_namemap_num2name(const OSSL_NAMEMAP *namemap, int number,
+                                   int idx);
  int ossl_namemap_doall_names(const OSSL_NAMEMAP *namemap, int number,
                               void (*fn)(const char *name, void *data),
                               void *data);
@@ -64,6 +66,9 @@ ossl_namemap_name2num_n() does the same thing as
 ossl_namemap_name2num(), but takes a string length I<name_len> as well,
 allowing the caller to use a fragment of a string as a name.
 
+ossl_namemap_num2name() finds the I<idx>th name associated with the
+id I<number>.
+
 ossl_namemap_doall_names() walks through all names associated with
 I<number> in the given I<namemap> and calls the function I<fn> for
 each of them.
@@ -88,9 +93,9 @@ to lock).
 ossl_namemap_add_name() returns the number associated with the added
 string, or zero on error.
 
-ossl_namemap_num2names() returns a pointer to a NULL-terminated list of
-pointers to the names corresponding to the given number, or NULL if
-it's undefined in the given B<OSSL_NAMEMAP>.
+ossl_namemap_num2name() returns a pointer to I<idx>th name associated
+with id I<number>, or NULL if it's undefined in the given
+B<OSSL_NAMEMAP>.
 
 ossl_namemap_name2num() and ossl_namemap_name2num_n() return the number
 corresponding to the given name, or 0 if it's undefined in the given