docs: “pointer to context object” vs “context object” #1475

issue real-or-random openend this issue on January 4, 2024
  1. real-or-random commented at 4:58 pm on January 4, 2024: contributor

    We should always say “pointer to a secp256k1 context object” in the API docs

    From IRC discussion, see https://gnusha.org/secp256k1/2024-01-04.log :

    008:37 < nickler> "ctx: pointer to a context object." or "ctx: a secp256k1 context object.". We currently use both arbitrarily afaics.
    108:42 < real_or_random> nickler: I think this confusion stems from _context_create where the docs say "Returns: a newly created context object."
    208:44 < real_or_random> I guess the initial idea was that the pointers of type secp256k1_context* ARE "context objects" (and don't POINT TO context object). perhaps this is also the reason for the different spacing around the asterisk for pointers 
    308:44 < real_or_random> I mean for contexts 
    408:46 < real_or_random> but I think that's too much abstraction. we should just always say "pointer to a context object" 
    508:46 < sipa> I can't remember ever thinking that the pointer itself was to be treated as the context object.
    608:47 < sipa> I think there are other places in the code where we confuse (for brevity) objects and pointers to them, though perhaps not in the public headers.
    708:47 < real_or_random> ok, maybe this is just my wrong interpretation
    
  2. real-or-random added the label user-documentation on Jan 4, 2024
  3. jonasnick closed this on Jan 9, 2024


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 01:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me