Skip to content

Commit 22a9ea1

Browse files
contrib: Explain explicit header guards
They were added in bitcoin-core#925 and deserve a comment.
1 parent 3c90bdd commit 22a9ea1

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)