Skip to content

Commit

Permalink
Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header gu…
Browse files Browse the repository at this point in the history
…ards

22a9ea1 contrib: Explain explicit header guards (Tim Ruffing)

Pull request description:

  They were added in bitcoin#925 and deserve a comment.

ACKs for top commit:
  gmaxwell:
    ACK 22a9ea1
  sipa:
    ACK 22a9ea1

Tree-SHA512: 832e28d71857d52912dae7e6c0e08a3183bb788996bb2470616c6fbbac6ba601cc74bb51a4c908aec7df9ae4f4cbf2cbb1b451cefde1b5a7359dc93299840278
  • Loading branch information
sipa committed May 12, 2021
2 parents 6939487 + 22a9ea1 commit 1e78c18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/lax_der_parsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
#ifndef SECP256K1_CONTRIB_LAX_DER_PARSING_H
#define SECP256K1_CONTRIB_LAX_DER_PARSING_H

/* #include secp256k1.h only when it hasn't been included yet.
This enables this file to be #included directly in other project
files (such as tests.c) without the need to set an explicit -I flag,
which would be necessary to locate secp256k1.h. */
#ifndef SECP256K1_H
#include <secp256k1.h>
#endif
Expand Down
4 changes: 4 additions & 0 deletions contrib/lax_der_privatekey_parsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
#ifndef SECP256K1_CONTRIB_BER_PRIVATEKEY_H
#define SECP256K1_CONTRIB_BER_PRIVATEKEY_H

/* #include secp256k1.h only when it hasn't been included yet.
This enables this file to be #included directly in other project
files (such as tests.c) without the need to set an explicit -I flag,
which would be necessary to locate secp256k1.h. */
#ifndef SECP256K1_H
#include <secp256k1.h>
#endif
Expand Down

0 comments on commit 1e78c18

Please sign in to comment.