Prefix all macros with SECP256K1_ #1449

issue real-or-random opened 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

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-05-19 06:52 UTC