Skip to content

Commit 1e78c18

Browse files
committed
Merge #940: contrib: Explain explicit header guards
22a9ea1 contrib: Explain explicit header guards (Tim Ruffing) Pull request description: They were added in #925 and deserve a comment. ACKs for top commit: gmaxwell: ACK 22a9ea1 sipa: ACK 22a9ea1 Tree-SHA512: 832e28d71857d52912dae7e6c0e08a3183bb788996bb2470616c6fbbac6ba601cc74bb51a4c908aec7df9ae4f4cbf2cbb1b451cefde1b5a7359dc93299840278
2 parents 6939487 + 22a9ea1 commit 1e78c18

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

contrib/lax_der_parsing.h

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
#ifndef SECP256K1_CONTRIB_LAX_DER_PARSING_H
5252
#define SECP256K1_CONTRIB_LAX_DER_PARSING_H
5353

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

contrib/lax_der_privatekey_parsing.h

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#ifndef SECP256K1_CONTRIB_BER_PRIVATEKEY_H
2929
#define SECP256K1_CONTRIB_BER_PRIVATEKEY_H
3030

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

0 commit comments

Comments
 (0)