Make the public API docs more consistent and explicit#783
Merged
real-or-random merged 2 commits intobitcoin-core:masterfrom Sep 15, 2021
Merged
Make the public API docs more consistent and explicit#783real-or-random merged 2 commits intobitcoin-core:masterfrom
real-or-random merged 2 commits intobitcoin-core:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I went over the public API and added missing explanations on when a pointer can be null and when it cannot,
and added some missing checks for null ctx and null pubkey pointers.
Open questions IMHO:
secp256k1_context_createreturn NULL? right now it could return null if you replaced the callbacks at compile time to ones that do return(unlike the default ones which never return).Is this enough to document answer
nofor the first question and just saying that if the callback returned then you violated the API sosecp256k1_context_createcan return NULL even though it is promised not to?Right now we AFAICT we never check if it returns null
Another nit I'm not sure about is wording
(does nothing if NULL)/(ignored if NULL)/(can be NULL)More missing docs:
dataargument to the default nonce functions