Prefix all macros with SECP256K1_ #1449

issue real-or-random openend this issue on December 1, 2023
  1. real-or-random commented at 12:07 pm on December 1, 2023: contributor

    We prefix all global names with secp256k1_ to avoid name collisions and ensure that the library can be header-only. If we believe in this, we should probably do the same for macros. (And even we don’t believe in this, I tend to think that having a prefix everywhere is just more consistent.)

    Perhaps it makes sense to separate internal macros and external “config” macros as suggested in #1121 (comment) by @sipa:

    I think it may be useful to have a strict separation between “external” macros (provided in config.h, or through compiler -D flags) flags, and “internal” macros which guide the actual source code conditionals?

    Also, we could reconsider the naming of the VERIFY macros as I suggested in #1381:

    And while we’re touching this anyway, we could consider renaming “check” to “assert”, which is a more precise term. (In fact, if we redefine VERIFY_CHECK to be empty in production, we have almost reimplemented assert.h…)

  2. real-or-random added the label refactor/smell on Dec 1, 2023
  3. real-or-random added the label development on Dec 1, 2023
  4. real-or-random cross-referenced this on Dec 1, 2023 from issue Implement new policy for VERIFY_CHECK and #ifdef VERIFY (issue #1381) by theStack
  5. real-or-random cross-referenced this on Dec 1, 2023 from issue Policy for VERIFY_CHECK and #ifdef VERIFY by real-or-random

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-11-23 23:15 UTC

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