Parameter ordering of some field and group functions contradict API standards #406

issue llamasoft opened this issue on July 25, 2016
  1. llamasoft commented at 8:12 PM on July 25, 2016: contributor

    I'd like to apologize in advance if this has been addressed already. I couldn't find mention of it in the issue tracker, so I thought I'd mention it.
    The API parameter ordering guide outlined in secp256k1.h say that array lengths should always follow the argument whose length they refer to.

    The following internal functions accept a length parameter before the object they refer to:

    I know these aren't API functions so the standards may not apply here, but it may be worth reordering their parameters for consistency's sake.

  2. apoelstra commented at 8:19 PM on July 25, 2016: contributor

    Thanks for looking through this! Agreed, these functions should be consistent with the public ones (though in general, the public API guarantees do not apply to internal functions).

  3. llamasoft commented at 6:19 PM on July 26, 2016: contributor

    I've added a pull request (#407) to rearrange the parameter order for the above functions plus two extra.

  4. gmaxwell commented at 10:55 AM on February 20, 2019: contributor

    (PR was merged)

  5. gmaxwell closed this on Feb 20, 2019


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: 2026-04-27 04:15 UTC

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