Skip to content

docs: "pointer to context object" vs "context object" #1475

@real-or-random

Description

@real-or-random

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 :

08:37 < nickler> "ctx: pointer to a context object." or "ctx: a secp256k1 context object.". We currently use both arbitrarily afaics.
08:42 < real_or_random> nickler: I think this confusion stems from _context_create where the docs say "Returns: a newly created context object."
08: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 
08:44 < real_or_random> I mean for contexts 
08:46 < real_or_random> but I think that's too much abstraction. we should just always say "pointer to a context object" 
08:46 < sipa> I can't remember ever thinking that the pointer itself was to be treated as the context object.
08: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.
08:47 < real_or_random> ok, maybe this is just my wrong interpretation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions