Skip to content

Commit 38ddc75

Browse files
committed
batch_add: add protect apis declaration with #ifdef
1 parent bfdeab4 commit 38ddc75

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

include/secp256k1_extrakeys.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_tweak_add
243243
const unsigned char *tweak32
244244
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
245245

246+
#ifdef ENABLE_MODULE_BATCH
246247
/** Adds the given tweaked pubkey check data to secp256k1_batch.
247248
*
248249
* The tweaked pubkey is represented by its 32-byte x-only serialization and
@@ -269,6 +270,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_batch_add_xonlypub_twea
269270
const secp256k1_xonly_pubkey *internal_pubkey,
270271
const unsigned char *tweak32
271272
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(6);
273+
#endif
272274

273275
#ifdef __cplusplus
274276
}

include/secp256k1_schnorrsig.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorrsig_verify(
176176
const secp256k1_xonly_pubkey *pubkey
177177
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(5);
178178

179+
#ifdef ENABLE_MODULE_BATCH
179180
/** Adds the given schnorrsig verification data to secp256k1_batch.
180181
*
181182
* Returns 1 on success, 0 on failure.
@@ -194,6 +195,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_batch_add_schnorrsig(
194195
size_t msglen,
195196
const secp256k1_xonly_pubkey *pubkey
196197
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(6);
198+
#endif
197199

198200
#ifdef __cplusplus
199201
}

0 commit comments

Comments
 (0)