[openssl/openssl] d7bb9d: Fix documented function return types
bitrotlink
noreply at github.com
Thu Mar 16 00:58:27 UTC 2023
Branch: refs/heads/openssl-3.1
Home: https://github.com/openssl/openssl
Commit: d7bb9d5673128cdccce2199e49f20d7663bd9fa1
https://github.com/openssl/openssl/commit/d7bb9d5673128cdccce2199e49f20d7663bd9fa1
Author: Andy Bernard <abg at bitrot.link>
Date: 2023-03-16 (Thu, 16 Mar 2023)
Changed paths:
M doc/man7/provider-decoder.pod
Log Message:
-----------
Fix documented function return types
The documented return type of the (incorrectly named; see below) OSSL_FUNC_decoder_export_object function signature is wrong; the correct type is int, due to the following line in core_dispatch.h:
OSSL_CORE_MAKE_FUNC(int, decoder_export_object,
Fixes #19543
Per the Github conversation with levitte and t8m for pull request #19964, the following issues are not addressed by this patch:
The macro OSSL_CORE_MAKE_FUNC in core_dispatch.h generates a function, and a corresponding function signature typedef with name ending in "_fn". The typedefed signature is unrelated to the signature of the function.
However, provider-decoder.pod describes typedefed signatures generated by the macro, but uses the names of the functions (lacking "_fn") instead of the typedefed signatures, which is a mismatch.
Also, the documented claim about OSSL_FUNC_decoder_export_object, etc that "None of these are actual functions" is contradicted by the fact that the code actually calls those functions, and calls them specifically by those names. E.g. in decoder_meth.c:
decoder->export_object = OSSL_FUNC_decoder_export_object(fns);
The functions are generated by OSSL_CORE_MAKE_FUNC.
The paragraph "None of these are actual functions"... should be replaced by something more like "These function signatures, generated by the OSSL_CORE_MAKE_FUNC macro, are for functions that are offered via function pointers in OSSL_DISPATCH arrays."
CLA: trivial
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19964)
(cherry picked from commit 04af51c276e7d785a194eb9ed199abf250c5b3b6)
More information about the openssl-commits
mailing list